<?php
/**
* Header Banner Options.
*
* @package Wind Energy
*/

$wind_energy_default = wind_energy_get_default_theme_options();
$wind_energy_post_category_list = wind_energy_post_category_list();

$wp_customize->add_section( 'wind_energy_header_banner_setting',
    array(
    'title'      => esc_html__( 'Slider Settings', 'wind-energy' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'wind_energy_theme_home_pannel',
    )
);

$wp_customize->add_setting('wind_energy_display_header_title',
    array(
        'default' => $wind_energy_default['wind_energy_display_header_title'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'wind_energy_sanitize_checkbox',
    )
);
$wp_customize->add_control('wind_energy_display_header_title',
    array(
        'label' => esc_html__('Enable / Disable Title', 'wind-energy'),
        'section' => 'title_tagline',
        'type' => 'checkbox',
    )
);

// Show/Hide Site Logo
$wp_customize->add_setting('wind_energy_display_logo', array(
    'default'           => false,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_checkbox',
));
$wp_customize->add_control('wind_energy_display_logo', array(
    'label'    => esc_html__('Enable / Disable Site Logo', 'wind-energy'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Title
$wp_customize->add_setting('wind_energy_display_title', array(
    'default'           => true,
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_checkbox',
));
$wp_customize->add_control('wind_energy_display_title', array(
    'label'    => esc_html__('Enable / Disable Site Title', 'wind-energy'),
    'section'  => 'title_tagline',
    'type'     => 'checkbox',
));

// Show/Hide Site Tagline
$wp_customize->add_setting('wind_energy_display_header_text',
    array(
        'default'           => false,
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'wind_energy_sanitize_checkbox',
    )
);
$wp_customize->add_control('wind_energy_display_header_text',
    array(
        'label' => esc_html__('Enable / Disable Site Tagline', 'wind-energy'),
        'section' => 'title_tagline',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('wind_energy_header_banner',
    array(
        'default' => $wind_energy_default['wind_energy_header_banner'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'wind_energy_sanitize_checkbox',
    )
);
$wp_customize->add_control('wind_energy_header_banner',
    array(
        'label' => esc_html__('Enable Slider', 'wind-energy'),
        'section' => 'wind_energy_header_banner_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting( 'wind_energy_header_banner_cat',
    array(
    'default'           => '',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'wind_energy_sanitize_select',
    )
);
$wp_customize->add_control( 'wind_energy_header_banner_cat',
    array(
    'label'       => esc_html__( 'Slider Post Category', 'wind-energy' ),
    'section'     => 'wind_energy_header_banner_setting',
    'type'        => 'select',
    'choices'     => $wind_energy_post_category_list,
    )
);

$wp_customize->add_setting( 'wind_energy_video_button_link',
    array(
    'default' => 'https://www.youtube.com/watch?v=9xwazD5SyVg&pp=ygULZHVtbXkgdmlkZW8%3D',
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control( 'wind_energy_video_button_link',
    array(
    'label'    => esc_html__( 'Slider Embedded Video URL', 'wind-energy' ),
    'section'  => 'wind_energy_header_banner_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting( 'wind_energy_installation_number',
    array(
    'default' => $wind_energy_default['wind_energy_installation_number'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_installation_number',
    array(
    'label'    => esc_html__( 'Installation Number', 'wind-energy' ),
    'section'  => 'wind_energy_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_installation_text',
    array(
    'default' => $wind_energy_default['wind_energy_installation_text'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_installation_text',
    array(
    'label'    => esc_html__( 'Installation Text', 'wind-energy' ),
    'section'  => 'wind_energy_header_banner_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_section( 'wind_energy_header_category_setting',
    array(
    'title'      => esc_html__( 'About Us Settings', 'wind-energy' ),
    'priority'   => 10,
    'capability' => 'edit_theme_options',
    'panel'      => 'wind_energy_theme_home_pannel',
    )
);


$wp_customize->add_setting('wind_energy_category_section',
    array(
        'default' => $wind_energy_default['wind_energy_category_section'],
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'wind_energy_sanitize_checkbox',
    )
);
$wp_customize->add_control('wind_energy_category_section',
    array(
        'label' => esc_html__('Enable About Us Section', 'wind-energy'),
        'section' => 'wind_energy_header_category_setting',
        'type' => 'checkbox',
    )
);

$wp_customize->add_setting('wind_energy_about_us_image',
    array(
        'default' => $wind_energy_default['wind_energy_about_us_image'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control( $wp_customize,'wind_energy_about_us_image',
        array(
            'label' => __('About Us Image','wind-energy'),
            'section' => 'wind_energy_header_category_setting',
            'settings' => 'wind_energy_about_us_image',
        )
    )
);

$wp_customize->add_setting( 'wind_energy_cat_short_title',
    array(
    'default'           => $wind_energy_default['wind_energy_cat_short_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_cat_short_title',
    array(
    'label'    => esc_html__( 'Short Title', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_cat_main_title',
    array(
    'default'           => $wind_energy_default['wind_energy_cat_main_title'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_cat_main_title',
    array(
    'label'    => esc_html__( 'Title', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_cat_main_content',
    array(
    'default'           => $wind_energy_default['wind_energy_cat_main_content'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_cat_main_content',
    array(
    'label'    => esc_html__( 'Content', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_about_button_text',
    array(
    'default'           => $wind_energy_default['wind_energy_about_button_text'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_about_button_text',
    array(
    'label'    => esc_html__( 'Button Text', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_about_button_url',
    array(
    'default'           => $wind_energy_default['wind_energy_about_button_url'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_about_button_url',
    array(
    'label'    => esc_html__( 'Button Url', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'url',
    )
);

$wp_customize->add_setting('wind_energy_about_us_right_small_image',
    array(
        'default' => $wind_energy_default['wind_energy_about_us_right_small_image'],
        'sanitize_callback' => 'esc_url_raw',
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control( $wp_customize,'wind_energy_about_us_right_small_image',
        array(
            'label' => __('About Right Image','wind-energy'),
            'section' => 'wind_energy_header_category_setting',
            'settings' => 'wind_energy_about_us_right_small_image',
        )
    )
);

$wp_customize->add_setting( 'wind_energy_about_us_phone_number',
    array(
    'default'           => $wind_energy_default['wind_energy_about_us_phone_number'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_about_us_phone_number',
    array(
    'label'    => esc_html__( 'Phone Number', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);

$wp_customize->add_setting( 'wind_energy_about_us_layout_email_id',
    array(
    'default'           => $wind_energy_default['wind_energy_about_us_layout_email_id'],
    'capability'        => 'edit_theme_options',
    'sanitize_callback' => 'sanitize_text_field',
    )
);
$wp_customize->add_control( 'wind_energy_about_us_layout_email_id',
    array(
    'label'    => esc_html__( 'Email Address', 'wind-energy' ),
    'section'  => 'wind_energy_header_category_setting',
    'type'     => 'text',
    )
);
