<?php
/**
 * Sidebar Option
 *
 * @package Minimalistic Blog
 */

$wp_customize->add_section(
	'minimalistic_blog_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'minimalistic-blog' ),
		'panel' => 'minimalistic_blog_theme_options',
	)
);

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

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

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

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

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

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