<?php
/**
* Layouts Settings.
*
* @package Beauty Parlour Salon
*/

$beauty_parlour_salon_default = beauty_parlour_salon_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'beauty_parlour_salon_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'beauty-parlour-salon' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'beauty_parlour_salon_theme_option_panel',
	)
);

$wp_customize->add_setting( 'beauty_parlour_salon_global_sidebar_layout',
    array(
    'default'           => $beauty_parlour_salon_default['beauty_parlour_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'beauty_parlour_salon_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'beauty_parlour_salon_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'beauty-parlour-salon' ),
    'section'     => 'beauty_parlour_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'beauty-parlour-salon' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'beauty-parlour-salon' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'beauty-parlour-salon' ),
        ),
    )
);

$wp_customize->add_setting('beauty_parlour_salon_page_sidebar_layout', array(
    'default'           => $beauty_parlour_salon_default['beauty_parlour_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'beauty_parlour_salon_sanitize_sidebar_option',
));

$wp_customize->add_control('beauty_parlour_salon_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'beauty-parlour-salon'),
    'section'     => 'beauty_parlour_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'beauty-parlour-salon'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'beauty-parlour-salon'),
        'no-sidebar'    => esc_html__('No Sidebar', 'beauty-parlour-salon'),
    ),
));

$wp_customize->add_setting('beauty_parlour_salon_post_sidebar_layout', array(
    'default'           => $beauty_parlour_salon_default['beauty_parlour_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'beauty_parlour_salon_sanitize_sidebar_option',
));

$wp_customize->add_control('beauty_parlour_salon_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'beauty-parlour-salon'),
    'section'     => 'beauty_parlour_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'beauty-parlour-salon'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'beauty-parlour-salon'),
        'no-sidebar'    => esc_html__('No Sidebar', 'beauty-parlour-salon'),
    ),
));

$wp_customize->add_setting('beauty_parlour_salon_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'beauty_parlour_salon_sanitize_checkbox',
    )
);
$wp_customize->add_control('beauty_parlour_salon_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'beauty-parlour-salon'),
        'section' => 'beauty_parlour_salon_layout_setting',
        'type' => 'checkbox',
    )
);