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

$wp_customize->add_section(
	'fuzion_blog_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'fuzion-blog' ),
		'panel' => 'fuzion_blog_theme_options',
	)
);

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

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

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

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

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

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