<?php
/*-------------------------------------
  #Layout
---------------------------------------*/
$wp_customize->add_panel(
	'acoustics_layout_panel',
	array(
		'title' => esc_html__('Layout', 'acoustics'),
		'description' => esc_html__('Breadcrumb, archive, post & page layout settings', 'acoustics'),
		'priority' => 17,
	)
);

$wp_customize->add_section(
	'acoustics_post_section',
	array(
		'title'          => esc_html__('Single', 'acoustics'),
		'capability'     => 'edit_theme_options',
		'panel'			 => 'acoustics_layout_panel',
		'priority'       => 5,
	)
);

$wp_customize->add_setting(
	'acoustics_post_layout',
	array(
		'default'  =>      'right-sidebar',
		'sanitize_callback' => 'sanitize_key'
	)
);

$wp_customize->add_control(
	new Acoustics_Control_RadioImage(
		$wp_customize,
		'acoustics_post_layout',
		array(
			'label'    => esc_html__( 'Post sidebar', 'acoustics' ),
			'section'  => 'acoustics_post_section',
			'columns'  => 'one-third',
			'choices'  => array(
				'left-sidebar' => array(
					'label' => esc_html__( 'Left sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/left-sidebar.svg'
                ),
				'no-sidebar' => array(
					'label' => esc_html__( 'No sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/no-sidebar.svg'
                ),
				'right-sidebar' => array(
					'label' => esc_html__( 'Right sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/right-sidebar.svg'
                )
			),
			'priority'  => 20
		)
	)
);

$wp_customize->add_section(
	'acoustics_page_section',
	array(
		'title'          => esc_html__('Page Sidebar', 'acoustics'),
		'capability'     => 'edit_theme_options',
		'panel'			 => 'acoustics_layout_panel',
		'priority'       => 10,
	)
);

$wp_customize->add_setting(
	'acoustics_page_layout',
	array(
		'default'  =>      'no-sidebar',
		'sanitize_callback' => 'sanitize_key'
	)
);

$wp_customize->add_control(
	new Acoustics_Control_RadioImage(
		$wp_customize,
		'acoustics_page_layout',
		array(
			'label'    => esc_html__( 'Page', 'acoustics' ),
			'section'  => 'acoustics_page_section',
			'columns'  => 'one-third',
			'choices'  => array(
				'left-sidebar' => array(
					'label' => esc_html__( 'Left sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/left-sidebar.svg'
                ),
				'no-sidebar' => array(
					'label' => esc_html__( 'No sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/no-sidebar.svg'
                ),
				'right-sidebar' => array(
					'label' => esc_html__( 'Right sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/right-sidebar.svg'
                )
			),
			'priority'  => 20
		)
	)
);

$wp_customize->add_section(
	'acoustics_archive_section',
	array(
		'title'          => esc_html__('Archive Sidebar', 'acoustics'),
		'capability'     => 'edit_theme_options',
		'panel'			 => 'acoustics_layout_panel',
		'priority'       => 25,
	)
);

$wp_customize->add_setting(
	'acoustics_archive_layout',
	array(
		'default'  =>      'left-sidebar',
		'sanitize_callback' => 'sanitize_key'
	)
);

$wp_customize->add_control(
	new Acoustics_Control_RadioImage(
		$wp_customize,
		'acoustics_archive_layout',
		array(
			'label'    => esc_html__( 'Archive', 'acoustics' ),
			'section'  => 'acoustics_archive_section',
			'columns'  => 'one-third',
			'choices'  => array(
				'left-sidebar' => array(
					'label' => esc_html__( 'Left sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/left-sidebar.svg'
                ),
				'no-sidebar' => array(
					'label' => esc_html__( 'No sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/no-sidebar.svg'
                ),
				'right-sidebar' => array(
					'label' => esc_html__( 'Right sidebar', 'acoustics' ),
					'url'   => '%s/assets/admin/src/layout/right-sidebar.svg'
                )
			),
			'priority'  => 20
		)
	)
);
