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

$wp_customize->add_section(
	'construktly_sidebar_option',
	array(
		'title' => esc_html__( 'Layout', 'construktly' ),
		'panel' => 'construktly_theme_options',
	)
);

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

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

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

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

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

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