<?php
/**
* Header Banner Options.
*
* @package Vacation Rental Booking
*/

$vacation_rental_booking_default = vacation_rental_booking_get_default_theme_options();
$vacation_rental_booking_post_category_list = vacation_rental_booking_post_category_list();

$wp_customize->add_section( 'vacation_rental_booking_header_banner_setting',
    array(
    'title'      => esc_html__( 'Slider Settings', 'vacation-rental-booking' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'vacation_rental_booking_theme_home_pannel',
    )
);

// Show/Hide Site Logo
$wp_customize->add_setting('vacation_rental_booking_display_logo', array(
    'default'           => false,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'vacation_rental_booking_sanitize_checkbox',
));
$wp_customize->add_control('vacation_rental_booking_display_logo', array(
    'label'    => esc_html__('Enable / Disable Site Logo', 'vacation-rental-booking'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Title
$wp_customize->add_setting('vacation_rental_booking_display_title', array(
    'default'           => true,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'vacation_rental_booking_sanitize_checkbox',
));
$wp_customize->add_control('vacation_rental_booking_display_title', array(
    'label'    => esc_html__('Enable / Disable Site Title', 'vacation-rental-booking'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Tagline
$wp_customize->add_setting('vacation_rental_booking_display_header_text',
    array(
        'default'           => false,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vacation_rental_booking_sanitize_checkbox',
    )
);
$wp_customize->add_control('vacation_rental_booking_display_header_text',
    array(
        'label' => esc_html__('Enable / Disable Site Tagline', 'vacation-rental-booking'),
        'section' => 'title_tagline',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('vacation_rental_booking_header_banner',
    array(
        'default' => $vacation_rental_booking_default['vacation_rental_booking_banner'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vacation_rental_booking_sanitize_checkbox',
    )
);
$wp_customize->add_control('vacation_rental_booking_header_banner',
    array(
        'label' => esc_html__('Enable Slider', 'vacation-rental-booking'),
        'section' => 'vacation_rental_booking_header_banner_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_header_banner_cat',
    array(
    'default'           => 'uncategorized',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'vacation_rental_booking_sanitize_select',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_header_banner_cat',
    array(
    'label'       => esc_html__( 'Slider Post Category', 'vacation-rental-booking' ),
    'section'     => 'vacation_rental_booking_header_banner_setting',
    'type'        => 'select',
    'choices'     => $vacation_rental_booking_post_category_list,
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_slider_team_box_title',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_slider_team_box_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_slider_team_box_title',
    array(
    'label'    => esc_html__( 'Team Title', 'vacation-rental-booking' ),
    'section'  => 'vacation_rental_booking_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_slider_team_box_text',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_slider_team_box_text'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_slider_team_box_text',
    array(
    'label'    => esc_html__( 'Team Text', 'vacation-rental-booking' ),
    'section'  => 'vacation_rental_booking_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting('vacation_rental_booking_slider_section_team_image',
    array(
        'default' => $vacation_rental_booking_default['vacation_rental_booking_slider_section_team_image'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control( $wp_customize,'vacation_rental_booking_slider_section_team_image',
        array(
            'label' => __('Team Image ','vacation-rental-booking'),
            'section' => 'vacation_rental_booking_header_banner_setting',
            'settings' => 'vacation_rental_booking_slider_section_team_image',
        )
    )
);
$wp_customize->add_setting( 'vacation_rental_booking_slider_faq_question',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_slider_faq_question'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_slider_faq_question',
    array(
    'label'    => esc_html__( 'Slider Fag Question', 'vacation-rental-booking' ),
    'section'  => 'vacation_rental_booking_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_slider_faq_question_answer',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_slider_faq_question_answer'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_slider_faq_question_answer',
    array(
    'label'    => esc_html__( 'Slider Fag Answer', 'vacation-rental-booking' ),
    'section'  => 'vacation_rental_booking_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_section( 'header_search_setting',
    array(
    'title'      => esc_html__( 'Search Settings', 'vacation-rental-booking' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'vacation_rental_booking_theme_home_pannel',
    )
);

$wp_customize->add_setting('vacation_rental_booking_header_search',
    array(
        'default' => $vacation_rental_booking_default['vacation_rental_booking_header_search'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'vacation_rental_booking_sanitize_checkbox',
    )
);
$wp_customize->add_control('vacation_rental_booking_header_search',
    array(
        'label' => esc_html__('Enable Search', 'vacation-rental-booking'),
        'section' => 'header_search_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_search_section_heading',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_search_section_heading'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_search_section_heading',
    array(
    'label'    => esc_html__( 'Search Title', 'vacation-rental-booking' ),
    'section'  => 'header_search_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting('vacation_rental_booking_search_form_shortcode',
    array(
        'default' => '',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control('vacation_rental_booking_search_form_shortcode',
    array(
        'label' => __('Search Form Shortcode','vacation-rental-booking'),
        'description' => __('Enter the Shortcode for the Contact Form Here','vacation-rental-booking'),
        'section' => 'header_search_setting',
        'setting' => 'vacation_rental_booking_search_form_shortcode',
        'type'    => 'text'
    )
);

// Top Destination Settings

$wp_customize->add_section( 'product_column_setting',
    array(
    'title'      => esc_html__( 'Top Destination Settings', 'vacation-rental-booking' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'vacation_rental_booking_theme_home_pannel',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_product_section_title',
    array(
    'default'           => $vacation_rental_booking_default['vacation_rental_booking_product_section_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_product_section_title',
    array(
    'label'    => esc_html__( 'Top Destination Title', 'vacation-rental-booking' ),
    'section'  => 'product_column_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'vacation_rental_booking_locations_post_cat',
    array(
    'default'           => '',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'vacation_rental_booking_sanitize_select',
    )
);
$wp_customize->add_control( 'vacation_rental_booking_locations_post_cat',
    array(
    'label'       => esc_html__( 'Top Destination Post Category', 'vacation-rental-booking' ),
    'section'     => 'product_column_setting',
    'type'        => 'select',
    'choices'     => $vacation_rental_booking_post_category_list,
    )
);

for ($i=1; $i <=8 ; $i++) { 

    $wp_customize->add_setting( 'vacation_rental_booking_post_section_days_text'.$i,
        array(
        'default'           => $vacation_rental_booking_default['vacation_rental_booking_post_section_days_text'],
        'capability'        => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field',
        )
    );
    $wp_customize->add_control( 'vacation_rental_booking_post_section_days_text'.$i,
        array(
        'label'    => esc_html__( 'Tour Packages ', 'vacation-rental-booking' ).$i,
        'section'  => 'product_column_setting',
        'type'     => 'text',
        )
    );
}