<?php
/**
* Layouts Settings.
*
* @package Omega Hair Salon
*/

$omega_hair_salon_default = omega_hair_salon_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'omega_hair_salon_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'omega-hair-salon' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'omega_hair_salon_theme_option_panel',
	)
);

$wp_customize->add_setting( 'omega_hair_salon_global_sidebar_layout',
    array(
    'default'           => $omega_hair_salon_default['omega_hair_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'omega_hair_salon_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'omega_hair_salon_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'omega-hair-salon' ),
    'section'     => 'omega_hair_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'omega-hair-salon' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'omega-hair-salon' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'omega-hair-salon' ),
        ),
    )
);

$wp_customize->add_setting('omega_hair_salon_page_sidebar_layout', array(
    'default'           => $omega_hair_salon_default['omega_hair_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'omega_hair_salon_sanitize_sidebar_option',
));

$wp_customize->add_control('omega_hair_salon_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'omega-hair-salon'),
    'section'     => 'omega_hair_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'omega-hair-salon'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'omega-hair-salon'),
        'no-sidebar'    => esc_html__('No Sidebar', 'omega-hair-salon'),
    ),
));

$wp_customize->add_setting('omega_hair_salon_post_sidebar_layout', array(
    'default'           => $omega_hair_salon_default['omega_hair_salon_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'omega_hair_salon_sanitize_sidebar_option',
));

$wp_customize->add_control('omega_hair_salon_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'omega-hair-salon'),
    'section'     => 'omega_hair_salon_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'omega-hair-salon'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'omega-hair-salon'),
        'no-sidebar'    => esc_html__('No Sidebar', 'omega-hair-salon'),
    ),
));

$wp_customize->add_setting('omega_hair_salon_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'omega_hair_salon_sanitize_checkbox',
    )
);
$wp_customize->add_control('omega_hair_salon_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'omega-hair-salon'),
        'section' => 'omega_hair_salon_layout_setting',
        'type' => 'checkbox',
    )
);