<?php
/**
 * Sidebar Option
 *
 * @package Prime Mag
 */

$wp_customize->add_section(
	'prime_mag_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'prime-mag' ),
		'panel' => 'prime_mag_theme_options',
	)
);

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

$wp_customize->add_control(
	'prime_mag_sidebar_position',
	array(
		'label'   => esc_html__( 'Global Sidebar Position', 'prime-mag' ),
		'section' => 'prime_mag_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'prime-mag' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'prime-mag' ),
		),
	)
);

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

$wp_customize->add_control(
	'prime_mag_post_sidebar_position',
	array(
		'label'   => esc_html__( 'Post Sidebar Position', 'prime-mag' ),
		'section' => 'prime_mag_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'prime-mag' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'prime-mag' ),
		),
	)
);

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

$wp_customize->add_control(
	'prime_mag_page_sidebar_position',
	array(
		'label'   => esc_html__( 'Page Sidebar Position', 'prime-mag' ),
		'section' => 'prime_mag_sidebar_option',
		'type'    => 'select',
		'choices' => array(
			'right-sidebar' => esc_html__( 'Right Sidebar', 'prime-mag' ),
			'no-sidebar'    => esc_html__( 'No Sidebar', 'prime-mag' ),
		),
	)
);
