<?php
/**
* Layouts Settings.
*
* @package Home Construction Builder
*/

$home_construction_builder_default = home_construction_builder_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'home_construction_builder_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'home-construction-builder' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'home_construction_builder_theme_option_panel',
	)
);

$wp_customize->add_setting( 'home_construction_builder_global_sidebar_layout',
    array(
    'default'           => $home_construction_builder_default['home_construction_builder_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'home_construction_builder_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'home_construction_builder_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'home-construction-builder' ),
    'section'     => 'home_construction_builder_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'home-construction-builder' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'home-construction-builder' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'home-construction-builder' ),
        ),
    )
);

$wp_customize->add_setting('home_construction_builder_page_sidebar_layout', array(
    'default'           => $home_construction_builder_default['home_construction_builder_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'home_construction_builder_sanitize_sidebar_option',
));

$wp_customize->add_control('home_construction_builder_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'home-construction-builder'),
    'section'     => 'home_construction_builder_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'home-construction-builder'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'home-construction-builder'),
        'no-sidebar'    => esc_html__('No Sidebar', 'home-construction-builder'),
    ),
));

$wp_customize->add_setting('home_construction_builder_post_sidebar_layout', array(
    'default'           => $home_construction_builder_default['home_construction_builder_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'home_construction_builder_sanitize_sidebar_option',
));

$wp_customize->add_control('home_construction_builder_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'home-construction-builder'),
    'section'     => 'home_construction_builder_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'home-construction-builder'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'home-construction-builder'),
        'no-sidebar'    => esc_html__('No Sidebar', 'home-construction-builder'),
    ),
));

$wp_customize->add_setting('home_construction_builder_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'home_construction_builder_sanitize_checkbox',
    )
);
$wp_customize->add_control('home_construction_builder_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'home-construction-builder'),
        'section' => 'home_construction_builder_layout_setting',
        'type' => 'checkbox',
    )
);