<?php
/**
* Layouts Settings.
*
* @package Cargo And Shipping Company
*/

$cargo_and_shipping_company_default = cargo_and_shipping_company_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'cargo_and_shipping_company_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'cargo-and-shipping-company' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'cargo_and_shipping_company_theme_option_panel',
	)
);

$wp_customize->add_setting( 'cargo_and_shipping_company_global_sidebar_layout',
    array(
    'default'           => $cargo_and_shipping_company_default['cargo_and_shipping_company_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'cargo_and_shipping_company_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'cargo_and_shipping_company_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'cargo-and-shipping-company' ),
    'section'     => 'cargo_and_shipping_company_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'cargo-and-shipping-company' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'cargo-and-shipping-company' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'cargo-and-shipping-company' ),
        ),
    )
);

$wp_customize->add_setting('cargo_and_shipping_company_page_sidebar_layout', array(
    'default'           => $cargo_and_shipping_company_default['cargo_and_shipping_company_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'cargo_and_shipping_company_sanitize_sidebar_option',
));

$wp_customize->add_control('cargo_and_shipping_company_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'cargo-and-shipping-company'),
    'section'     => 'cargo_and_shipping_company_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'cargo-and-shipping-company'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'cargo-and-shipping-company'),
        'no-sidebar'    => esc_html__('No Sidebar', 'cargo-and-shipping-company'),
    ),
));

$wp_customize->add_setting('cargo_and_shipping_company_post_sidebar_layout', array(
    'default'           => $cargo_and_shipping_company_default['cargo_and_shipping_company_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'cargo_and_shipping_company_sanitize_sidebar_option',
));

$wp_customize->add_control('cargo_and_shipping_company_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'cargo-and-shipping-company'),
    'section'     => 'cargo_and_shipping_company_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'cargo-and-shipping-company'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'cargo-and-shipping-company'),
        'no-sidebar'    => esc_html__('No Sidebar', 'cargo-and-shipping-company'),
    ),
));

$wp_customize->add_setting('cargo_and_shipping_company_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'cargo_and_shipping_company_sanitize_checkbox',
    )
);
$wp_customize->add_control('cargo_and_shipping_company_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'cargo-and-shipping-company'),
        'section' => 'cargo_and_shipping_company_layout_setting',
        'type' => 'checkbox',
    )
);