<?php
/**
* Layouts Settings.
*
* @package Travel Destination
*/

$travel_destination_default = travel_destination_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'travel_destination_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'travel-destination' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'travel_destination_theme_option_panel',
	)
);

$wp_customize->add_setting( 'travel_destination_global_sidebar_layout',
    array(
    'default'           => $travel_destination_default['travel_destination_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'travel_destination_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'travel_destination_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'travel-destination' ),
    'section'     => 'travel_destination_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'travel-destination' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'travel-destination' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'travel-destination' ),
        ),
    )
);

$wp_customize->add_setting('travel_destination_page_sidebar_layout', array(
    'default'           => $travel_destination_default['travel_destination_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'travel_destination_sanitize_sidebar_option',
));

$wp_customize->add_control('travel_destination_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'travel-destination'),
    'section'     => 'travel_destination_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'travel-destination'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'travel-destination'),
        'no-sidebar'    => esc_html__('No Sidebar', 'travel-destination'),
    ),
));

$wp_customize->add_setting('travel_destination_post_sidebar_layout', array(
    'default'           => $travel_destination_default['travel_destination_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'travel_destination_sanitize_sidebar_option',
));

$wp_customize->add_control('travel_destination_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'travel-destination'),
    'section'     => 'travel_destination_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'travel-destination'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'travel-destination'),
        'no-sidebar'    => esc_html__('No Sidebar', 'travel-destination'),
    ),
));

$wp_customize->add_setting('travel_destination_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'travel_destination_sanitize_checkbox',
    )
);
$wp_customize->add_control('travel_destination_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'travel-destination'),
        'section' => 'travel_destination_layout_setting',
        'type' => 'checkbox',
    )
);