<?php
/**
 * Sidebar settings
 */

$wp_customize->add_section(
	'blooming_blog_sidebar_option',
	array(
		'title' => esc_html__( 'Sidebar Options', 'blooming-blog' ),
		'panel' => 'blooming_blog_theme_options_panel',
	)
);

// Sidebar Option - Global Sidebar Position.
$wp_customize->add_setting(
	'blooming_blog_sidebar_position',
	array(
		'sanitize_callback' => 'blooming_blog_sanitize_select',
		'default'           => 'no-sidebar',
	)
);

$wp_customize->add_control(
	'blooming_blog_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'blooming-blog' ),
		'section' => 'blooming_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'blooming-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'blooming-blog' ),
		),
	)
);

// Sidebar Option - Post Sidebar Position.
$wp_customize->add_setting(
	'blooming_blog_post_sidebar_position',
	array(
		'sanitize_callback' => 'blooming_blog_sanitize_select',
		'default'           => 'no-sidebar',
	)
);

$wp_customize->add_control(
	'blooming_blog_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'blooming-blog' ),
		'section' => 'blooming_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'blooming-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'blooming-blog' ),
		),
	)
);

// Sidebar Option - Page Sidebar Position.
$wp_customize->add_setting(
	'blooming_blog_page_sidebar_position',
	array(
		'sanitize_callback' => 'blooming_blog_sanitize_select',
		'default'           => 'no-sidebar',
	)
);

$wp_customize->add_control(
	'blooming_blog_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'blooming-blog' ),
		'section' => 'blooming_blog_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'blooming-blog' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'blooming-blog' ),
		),
	)
);
