<?php
/**
* Layouts Settings.
*
* @package Multi Sports Club
*/

$multi_sports_club_default = multi_sports_club_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'multi_sports_club_layout_setting',
	array(
	'title'      => esc_html__( 'Sidebar Settings', 'multi-sports-club' ),
	'priority'   => 20,
	'capability' => 'edit_theme_options',
	'panel'      => 'multi_sports_club_theme_option_panel',
	)
);

$wp_customize->add_setting( 'multi_sports_club_global_sidebar_layout',
    array(
    'default'           => $multi_sports_club_default['multi_sports_club_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'multi_sports_club_sanitize_sidebar_option',
    )
);
$wp_customize->add_control( 'multi_sports_club_global_sidebar_layout',
    array(
    'label'       => esc_html__( 'Global Sidebar Layout', 'multi-sports-club' ),
    'section'     => 'multi_sports_club_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__( 'Right Sidebar', 'multi-sports-club' ),
        'left-sidebar'  => esc_html__( 'Left Sidebar', 'multi-sports-club' ),
        'no-sidebar'    => esc_html__( 'No Sidebar', 'multi-sports-club' ),
        ),
    )
);

$wp_customize->add_setting('multi_sports_club_page_sidebar_layout', array(
    'default'           => $multi_sports_club_default['multi_sports_club_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'multi_sports_club_sanitize_sidebar_option',
));

$wp_customize->add_control('multi_sports_club_page_sidebar_layout', array(
    'label'       => esc_html__('Single Page Sidebar Layout', 'multi-sports-club'),
    'section'     => 'multi_sports_club_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'multi-sports-club'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'multi-sports-club'),
        'no-sidebar'    => esc_html__('No Sidebar', 'multi-sports-club'),
    ),
));

$wp_customize->add_setting('multi_sports_club_post_sidebar_layout', array(
    'default'           => $multi_sports_club_default['multi_sports_club_global_sidebar_layout'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'multi_sports_club_sanitize_sidebar_option',
));

$wp_customize->add_control('multi_sports_club_post_sidebar_layout', array(
    'label'       => esc_html__('Single Post Sidebar Layout', 'multi-sports-club'),
    'section'     => 'multi_sports_club_layout_setting',
    'type'        => 'select',
    'choices'     => array(
        'right-sidebar' => esc_html__('Right Sidebar', 'multi-sports-club'),
        'left-sidebar'  => esc_html__('Left Sidebar', 'multi-sports-club'),
        'no-sidebar'    => esc_html__('No Sidebar', 'multi-sports-club'),
    ),
));

$wp_customize->add_setting('multi_sports_club_sticky_sidebar',
    array(
        'default'           => true,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'multi_sports_club_sanitize_checkbox',
    )
);
$wp_customize->add_control('multi_sports_club_sticky_sidebar',
    array(
        'label' => esc_html__('Enable/Disable Sticky Sidebar', 'multi-sports-club'),
        'section' => 'multi_sports_club_layout_setting',
        'type' => 'checkbox',
    )
);