<?php
/**
* Layouts Settings.
*
* @package Agriculture Farm Lite
*/

$agriculture_farm_lite_default = agriculture_farm_lite_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'agriculture_farm_lite_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'agriculture-farm-lite' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'agriculture_farm_lite_theme_option_panel',
	)
);

$wp_customize->add_setting( 'agriculture_farm_lite_global_sidebar_layout',
    array(
    'default'           => $agriculture_farm_lite_default['agriculture_farm_lite_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'agriculture_farm_lite_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'agriculture-farm-lite' ),
    'section'     => 'agriculture_farm_lite_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'agriculture-farm-lite' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'agriculture-farm-lite' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'agriculture-farm-lite' ),
        ),
    )
);

$wp_customize->add_setting('agriculture_farm_lite_page_sidebar_layout', array(
    'default'           => $agriculture_farm_lite_default['agriculture_farm_lite_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_sidebar_option',
));

$wp_customize->add_control('agriculture_farm_lite_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'agriculture-farm-lite'),
    'section'     => 'agriculture_farm_lite_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'agriculture-farm-lite'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'agriculture-farm-lite'),
        'no-sidebar'    => esc_html__('No Sidebar', 'agriculture-farm-lite'),
    ),
));

$wp_customize->add_setting('agriculture_farm_lite_post_sidebar_layout', array(
    'default'           => $agriculture_farm_lite_default['agriculture_farm_lite_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'agriculture_farm_lite_sanitize_sidebar_option',
));

$wp_customize->add_control('agriculture_farm_lite_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'agriculture-farm-lite'),
    'section'     => 'agriculture_farm_lite_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'agriculture-farm-lite'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'agriculture-farm-lite'),
        'no-sidebar'    => esc_html__('No Sidebar', 'agriculture-farm-lite'),
    ),
));

$wp_customize->add_setting('agriculture_farm_lite_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'agriculture_farm_lite_sanitize_checkbox',
    )
);
$wp_customize->add_control('agriculture_farm_lite_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'agriculture-farm-lite'),
        'section' => 'agriculture_farm_lite_layout_setting',
        'type' => 'checkbox',
    )
);