<?php
/**
* Layouts Settings.
*
* @package Training Institute Academy
*/

$training_institute_academy_default = training_institute_academy_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'training_institute_academy_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'training-institute-academy' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'training_institute_academy_theme_option_panel',
	)
);

$wp_customize->add_setting( 'training_institute_academy_global_sidebar_layout',
    array(
    'default'           => $training_institute_academy_default['training_institute_academy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'training_institute_academy_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'training_institute_academy_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'training-institute-academy' ),
    'section'     => 'training_institute_academy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'training-institute-academy' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'training-institute-academy' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'training-institute-academy' ),
        ),
    )
);

$wp_customize->add_setting('training_institute_academy_page_sidebar_layout', array(
    'default'           => $training_institute_academy_default['training_institute_academy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'training_institute_academy_sanitize_sidebar_option',
));

$wp_customize->add_control('training_institute_academy_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'training-institute-academy'),
    'section'     => 'training_institute_academy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'training-institute-academy'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'training-institute-academy'),
        'no-sidebar'    => esc_html__('No Sidebar', 'training-institute-academy'),
    ),
));

$wp_customize->add_setting('training_institute_academy_post_sidebar_layout', array(
    'default'           => $training_institute_academy_default['training_institute_academy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'training_institute_academy_sanitize_sidebar_option',
));

$wp_customize->add_control('training_institute_academy_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'training-institute-academy'),
    'section'     => 'training_institute_academy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'training-institute-academy'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'training-institute-academy'),
        'no-sidebar'    => esc_html__('No Sidebar', 'training-institute-academy'),
    ),
));

$wp_customize->add_setting('training_institute_academy_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'training_institute_academy_sanitize_checkbox',
    )
);
$wp_customize->add_control('training_institute_academy_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'training-institute-academy'),
        'section' => 'training_institute_academy_layout_setting',
        'type' => 'checkbox',
    )
);