<?php
/**
* Layouts Settings.
*
* @package Wind Energy
*/

$wind_energy_default = wind_energy_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'wind_energy_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'wind-energy' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'wind_energy_theme_option_panel',
	)
);

$wp_customize->add_setting( 'wind_energy_global_sidebar_layout',
    array(
    'default'           => $wind_energy_default['wind_energy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'wind_energy_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'wind-energy' ),
    'section'     => 'wind_energy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'wind-energy' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'wind-energy' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'wind-energy' ),
        ),
    )
);

$wp_customize->add_setting('wind_energy_page_sidebar_layout', array(
    'default'           => $wind_energy_default['wind_energy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_sidebar_option',
));

$wp_customize->add_control('wind_energy_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'wind-energy'),
    'section'     => 'wind_energy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'wind-energy'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'wind-energy'),
        'no-sidebar'    => esc_html__('No Sidebar', 'wind-energy'),
    ),
));

$wp_customize->add_setting('wind_energy_post_sidebar_layout', array(
    'default'           => $wind_energy_default['wind_energy_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_sidebar_option',
));

$wp_customize->add_control('wind_energy_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'wind-energy'),
    'section'     => 'wind_energy_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'wind-energy'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'wind-energy'),
        'no-sidebar'    => esc_html__('No Sidebar', 'wind-energy'),
    ),
));

$wp_customize->add_setting('wind_energy_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'wind_energy_sanitize_checkbox',
    )
);
$wp_customize->add_control('wind_energy_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'wind-energy'),
        'section' => 'wind_energy_layout_setting',
        'type' => 'checkbox',
    )
);