<?php
/**
 * Sidebar Option
 *
 * @package Corporaze
 */

$wp_customize->add_section(
	'corporaze_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'corporaze' ),
		'panel' => 'corporaze_theme_options',
	)
);

// Sidebar Option - Global Sidebar Position.
$wp_customize->add_setting(
	'corporaze_sidebar_position',
	array(
		'sanitize_callback' => 'corporaze_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'corporaze_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'corporaze' ),
		'section' => 'corporaze_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'corporaze' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'corporaze' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'corporaze' ),
		),
	)
);

// Sidebar Option - Post Sidebar Position.
$wp_customize->add_setting(
	'corporaze_post_sidebar_position',
	array(
		'sanitize_callback' => 'corporaze_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'corporaze_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'corporaze' ),
		'section' => 'corporaze_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'corporaze' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'corporaze' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'corporaze' ),
		),
	)
);

// Sidebar Option - Page Sidebar Position.
$wp_customize->add_setting(
	'corporaze_page_sidebar_position',
	array(
		'sanitize_callback' => 'corporaze_sanitize_select',
		'default'           => 'right-sidebar',
	)
);

$wp_customize->add_control(
	'corporaze_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'corporaze' ),
		'section' => 'corporaze_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'corporaze' ),
			'left-sidebar'  => esc_html__( 'Left Sidebar', 'corporaze' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'corporaze' ),
		),
	)
);
