<?php

/*-------------------------------------------------------------------------------------------*/
/**
 * Sidebar Option
 *
 */
$wp_customize->add_section(
    'sewa_default_sidebar_layout_option',
    array(
        'title'    => esc_html__('Default Sidebar Layout Option', 'sewa'),
        'panel'    => 'sewa_theme_options',
        'priority' => 5,
    )
);

/**
 * Sidebar Option
 */
$wp_customize->add_setting(
    'sewa_sidebar_layout_option',
    array(
        'default'           => $default['sewa_sidebar_layout_option'],
        'sanitize_callback' => 'sewa_sanitize_select',
    )
);


$layout = sewa_sidebar_layout();
$wp_customize->add_control('sewa_sidebar_layout_option',
    array(
        'label'       => esc_html__('Default Sidebar Layout', 'sewa'),
        'description' => esc_html__('Home/front page does not have sidebar. Inner pages like blog, archive single page/post Sidebar Layout. However single page/post sidebar can be overridden.', 'sewa'),
        'section'     => 'sewa_default_sidebar_layout_option',
        'type'        => 'select',
        'choices'     => $layout,
        'priority'    => 10
    )
);


/*-------------------------------------------------------------------------------------------*/

/**
 * Blog/Archive Layout Option
 *
 * @since 1.0.0
 */
$wp_customize->add_section(
    'sewa_blog_archive_layout_option',
    array(
        'title'    => esc_html__('Blog/Archive Layout Option', 'sewa'),
        'panel'    => 'sewa_theme_options',
        'priority' => 6,
    )
);


/**
 * Blog Page Title
 */
$wp_customize->add_setting(
    'sewa_blog_title_option',
    array(
        'default'           => $default['sewa_blog_title_option'],
        'sanitize_callback' => 'sanitize_text_field',
    )
);

$wp_customize->add_control('sewa_blog_title_option',
    array(
        'label'    => esc_html__('Blog Page Title', 'sewa'),
        'section'  => 'sewa_blog_archive_layout_option',
        'type'     => 'text',
        'priority' => 11
    )
);

/**
 * Read More Text
 */
$wp_customize->add_setting(
    'sewa_read_more_text_blog_archive_option',
    array(
        'default'           => $default['sewa_read_more_text_blog_archive_option'],
        'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control('sewa_read_more_text_blog_archive_option',
    array(
        'label'    => esc_html__('Read More Text', 'sewa'),
        'section'  => 'sewa_blog_archive_layout_option',
        'type'     => 'text',
        'priority' => 14
    )
);

/**
 * Pagination Types
 */
$pagination_types = sewa_pagination_types();
$wp_customize->add_setting(
    'sewa_blog_pagination_types',
    array(
        'default'           => $default['sewa_blog_pagination_types'],
        'sanitize_callback' => 'sewa_sanitize_select',
    )
);
$wp_customize->add_control('sewa_blog_pagination_types',
    array(
        'label'    => esc_html__('Select Required Pagination Type', 'sewa'),
        'section'  => 'sewa_blog_archive_layout_option',
        'type'     => 'select',
        'choices'  => $pagination_types,
        'priority' => 14
    )
);