<?php
/**
* Layouts Settings.
*
* @package NewsNation
*/

$newsnation_default = newsnation_get_default_theme_options();

// Layout Section.
$wp_customize->add_section( 'layout_setting',
	array(
	'title'      => esc_html__( 'Archive Settings', 'newsnation' ),
	'priority'   => 60,
	'capability' => 'edit_theme_options',
	'panel'      => 'theme_option_panel',
	)
);


$wp_customize->add_setting( 'global_sidebar_layout',
	array(
	'default'           => $newsnation_default['global_sidebar_layout'],
	'capability'        => 'edit_theme_options',
	'sanitize_callback' => 'newsnation_sanitize_sidebar_option',
	)
);
$wp_customize->add_control( 'global_sidebar_layout',
	array(
	'label'       => esc_html__( 'Global Sidebar Layout', 'newsnation' ),
	'section'     => 'layout_setting',
	'type'        => 'select',
	'choices'     => array(
		'right-sidebar' => esc_html__( 'Right Sidebar', 'newsnation' ),
		'left-sidebar'  => esc_html__( 'Left Sidebar', 'newsnation' ),
		'no-sidebar'    => esc_html__( 'No Sidebar', 'newsnation' ),
	    ),
	)
);

// Archive Layout.
$wp_customize->add_setting(
    'newsnation_archive_layout',
    array(
        'default' 			=> $newsnation_default['newsnation_archive_layout'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'newsnation_sanitize_archive_layout'
    )
);
$wp_customize->add_control(
    new NewsNation_Custom_Radio_Image_Control(
        $wp_customize,
        'newsnation_archive_layout',
        array(
            'settings'      => 'newsnation_archive_layout',
            'section'       => 'layout_setting',
            'label'         => esc_html__( 'Archive Layout', 'newsnation' ),
            'choices'       => array(
            	'default'  => get_template_directory_uri() . '/assets/images/Layout-style-1.png',
                'full'  => get_template_directory_uri() . '/assets/images/Layout-style-2.png',
                'masonry'  => get_template_directory_uri() . '/assets/images/Layout-style-3.png',
            )
        )
    )
);


$wp_customize->add_setting('ed_image_content_inverse',
    array(
        'default' => $newsnation_default['ed_image_content_inverse'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'newsnation_sanitize_checkbox',
    )
);
$wp_customize->add_control('ed_image_content_inverse',
    array(
        'label' => esc_html__('Inverse Image with Content', 'newsnation'),
        'section' => 'layout_setting',
        'type' => 'checkbox',
        'active_callback' => 'newsnation_header_archive_layout_ac',
    )
);

