<?php
/**
* Layouts Settings.
*
* @package Aerial Drone
*/

$aerial_drone_default = aerial_drone_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'aerial_drone_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'aerial-drone' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'aerial_drone_theme_option_panel',
	)
);

$wp_customize->add_setting( 'aerial_drone_global_sidebar_layout',
    array(
    'default'           => $aerial_drone_default['aerial_drone_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'aerial_drone_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'aerial_drone_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'aerial-drone' ),
    'section'     => 'aerial_drone_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'aerial-drone' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'aerial-drone' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'aerial-drone' ),
        ),
    )
);

$wp_customize->add_setting('aerial_drone_page_sidebar_layout', array(
    'default'           => $aerial_drone_default['aerial_drone_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'aerial_drone_sanitize_sidebar_option',
));

$wp_customize->add_control('aerial_drone_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'aerial-drone'),
    'section'     => 'aerial_drone_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'aerial-drone'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'aerial-drone'),
        'no-sidebar'    => esc_html__('No Sidebar', 'aerial-drone'),
    ),
));

$wp_customize->add_setting('aerial_drone_post_sidebar_layout', array(
    'default'           => $aerial_drone_default['aerial_drone_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'aerial_drone_sanitize_sidebar_option',
));

$wp_customize->add_control('aerial_drone_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'aerial-drone'),
    'section'     => 'aerial_drone_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'aerial-drone'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'aerial-drone'),
        'no-sidebar'    => esc_html__('No Sidebar', 'aerial-drone'),
    ),
));

$wp_customize->add_setting('aerial_drone_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'aerial_drone_sanitize_checkbox',
    )
);
$wp_customize->add_control('aerial_drone_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'aerial-drone'),
        'section' => 'aerial_drone_layout_setting',
        'type' => 'checkbox',
    )
);