<?php
/**
 * Home Section
 *
 * @package prime-construction
 */
$default = prime_construction_get_default_theme_options();

/** Slider Info section */
$wp_customize->add_section(
    'featured_slider_info_section',
    array(
        'title' => __('Slider Info', 'prime-construction'),
        'priority' => 1,
        'panel' => 'prime_construction_section_panel',
    )
);

// Enable Section
$wp_customize->add_setting(
    'slider_enable_section',
    array(
        'default' => true,
        'sanitize_callback' => 'prime_construction_sanitize_switch',

    )
);
$wp_customize->add_control(
    new prime_construction_Toggle_Checkbox_Custom_control(
        $wp_customize,
        'slider_enable_section',
        array(
            'settings' => 'slider_enable_section',
            'section' => 'featured_slider_info_section',
            'label' => __('Enable Section', 'prime-construction'),
            'on_off_label' => array(
                'on' => __('Yes', 'prime-construction'),
                'off' => __('No', 'prime-construction')
            ),
        )
    )
);

// /// effects
$wp_customize->add_setting('prime_construction_featured_slider_onload_effects', array(
    'default' => 'Bounce In Up',
    'sanitize_callback' => 'prime_construction_sanitize_choices',
));
$wp_customize->add_control('prime_construction_featured_slider_onload_effects', array(
    'type' => 'select',
    'label' => __('Box Onload Transition Effects', 'prime-construction'),
    'choices' => array(
        'wow bounceInLeft' => __('Bounce In Left', 'prime-construction'),
        'wow bounceInRight' => __('Bounce In Right', 'prime-construction'),
        'wow bounceInUp' => __('Bounce In Up', 'prime-construction'),
        'wow bounceInDown' => __('Bounce In Down', 'prime-construction'),
        'wow zoomIn' => __('Zoom In', 'prime-construction'),
        'wow zoomOut' => __('Zoom Out', 'prime-construction'),
        'wow fadeInDown' => __('Fade In Down', 'prime-construction'),
        'wow fadeInUp' => __('Fade In Up', 'prime-construction'),
        'wow fadeInLeft' => __('Fade In Left', 'prime-construction'),
        'wow fadeInRight' => __('Fade In Right', 'prime-construction'),
        'flip-up' => __('Flip Up', 'prime-construction')
    ),
    'section' => 'featured_slider_info_section',
));


$wp_customize->add_setting(
    'featured_slider_badge_text',
    array(
        'default' => '25+ Years of Excellence',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_badge_text',
    array(
        'label' => __('Hero Badge Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_badge_text',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_title',
    array(
        'default' => 'BUILDING THE FUTURE',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_title',
    array(
        'label' => __('Hero Heading Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_title',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_description',
    array(
        'default' => 'Next-generation construction solutions powered by innovation, precision, and cutting-edge technology.',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_textarea_field'
    )
);
$wp_customize->add_control(
    'featured_slider_description',
    array(
        'label' => __('Hero Description Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_description',
        'type' => 'textarea'
    )
);

$wp_customize->add_setting(
    'featured_slider_right_image',
    array(
        'default' => get_template_directory_uri() . '/assets/images/low-angle-view-building-glass-facade-beautiful-cloudy-sky.jpg',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control(
    $wp_customize,
    'featured_slider_right_image',
    array(
        'label' => __('Hero Right Image', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_right_image',
    )
));

$wp_customize->add_setting(
    'featured_slider_small_image',
    array(
        'default' => get_template_directory_uri() . '/assets/images/low-angle-view-building-glass-facade-beautiful-cloudy-sky.jpg',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control(
    $wp_customize,
    'featured_slider_small_image',
    array(
        'label' => __('Hero Small Overlay Image', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_small_image',
    )
));

$wp_customize->add_setting(
    'featured_slider_project_label',
    array(
        'default' => 'Current Project',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_label',
    array(
        'label' => __('Current Project Label', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_label',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_project_title',
    array(
        'default' => 'Downtown Tower',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_title',
    array(
        'label' => __('Current Project Title', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_title',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_project_progress',
    array(
        'default' => '75%',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_progress',
    array(
        'label' => __('Current Project Progress Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_progress',
        'type' => 'text'
    )
);
$wp_customize->add_setting(
    'prime_construction_button1_text',
    array(
        'default' => __('Read More', 'prime-construction'),
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);

$wp_customize->add_control(
    'prime_construction_button1_text',
    array(
        'label' => __('Read More Button Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'prime_construction_button1_text',
        'active_callback' => 'prime_construction_featured_whatweoffer_active',
        'type' => 'text'
    )
);
$wp_customize->add_setting(
    'prime_construction_button2_text',
    array(
        'default' => __('Contact', 'prime-construction'),
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);

$wp_customize->add_control(
    'prime_construction_button2_text',
    array(
        'label' => __('Contact Button Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'prime_construction_button2_text',
        'active_callback' => 'prime_construction_featured_whatweoffer_active',
        'type' => 'text'
    )
);
$wp_customize->add_setting(
    'featured_slider_button1_url',
    array(
        'default' => '#',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    'featured_slider_button1_url',
    array(
        'label' => __('Button 1 URL', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_button1_url',
        'type' => 'url'
    )
);

$wp_customize->add_setting(
    'featured_slider_button2_url',
    array(
        'default' => '#',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    'featured_slider_button2_url',
    array(
        'label' => __('Button 2 URL', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_button2_url',
        'type' => 'url'
    )
);

/** Slider Color section */

$wp_customize->add_control(
    'prime_construction_button1_text',
    array(
        'label' => __('Read More Button Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'prime_construction_button1_text',
        'active_callback' => 'prime_construction_featured_whatweoffer_active',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_badge_text',
    array(
        'default' => '25+ Years of Excellence',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_badge_text',
    array(
        'label' => __('Hero Badge Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_badge_text',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_title',
    array(
        'default' => 'BUILDING THE FUTURE',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_title',
    array(
        'label' => __('Hero Heading Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_title',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_description',
    array(
        'default' => 'Next-generation construction solutions powered by innovation, precision, and cutting-edge technology.',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_textarea_field'
    )
);
$wp_customize->add_control(
    'featured_slider_description',
    array(
        'label' => __('Hero Description Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_description',
        'type' => 'textarea'
    )
);

$wp_customize->add_setting(
    'featured_slider_right_image',
    array(
        'default' => get_template_directory_uri() . '/assets/images/low-angle-view-building-glass-facade-beautiful-cloudy-sky.jpg',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control(
    $wp_customize,
    'featured_slider_right_image',
    array(
        'label' => __('Hero Right Image', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_right_image',
    )
));

$wp_customize->add_setting(
    'featured_slider_small_image',
    array(
        'default' => get_template_directory_uri() . '/assets/images/low-angle-view-building-glass-facade-beautiful-cloudy-sky.jpg',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(new WP_Customize_Image_Control(
    $wp_customize,
    'featured_slider_small_image',
    array(
        'label' => __('Hero Small Overlay Image', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_small_image',
    )
));

$wp_customize->add_setting(
    'featured_slider_project_label',
    array(
        'default' => 'Current Project',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_label',
    array(
        'label' => __('Current Project Label', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_label',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_project_title',
    array(
        'default' => 'Downtown Tower',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_title',
    array(
        'label' => __('Current Project Title', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_title',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_project_progress',
    array(
        'default' => '75%',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'sanitize_text_field'
    )
);
$wp_customize->add_control(
    'featured_slider_project_progress',
    array(
        'label' => __('Current Project Progress Text', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_project_progress',
        'type' => 'text'
    )
);

$wp_customize->add_setting(
    'featured_slider_button1_url',
    array(
        'default' => '#',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    'featured_slider_button1_url',
    array(
        'label' => __('Button 1 URL', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_button1_url',
        'type' => 'url'
    )
);

$wp_customize->add_setting(
    'featured_slider_button2_url',
    array(
        'default' => '#',
        'type' => 'theme_mod',
        'capability' => 'edit_theme_options',
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    'featured_slider_button2_url',
    array(
        'label' => __('Button 2 URL', 'prime-construction'),
        'section' => 'featured_slider_info_section',
        'settings' => 'featured_slider_button2_url',
        'type' => 'url'
    )
);

/** Slider Color section */

$wp_customize->add_section(
    'slider_text_colors_section',
    array(
        'title' => __('Colors', 'prime-construction'),
        'priority' => 2,
        'panel' => 'prime_construction_section_panel',
    )
);

// ///////// Title Text Color
$wp_customize->add_setting('slider_title_color', array(
    'default' => '#fff',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_title_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Title Color', 'prime-construction'),
)));

// ///////// Paragraph Text Color
$wp_customize->add_setting('slider_subtitle_color', array(
    'default' => '#ffffff',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_subtitle_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Paragraph Color', 'prime-construction'),
)));

// ///////// Slick Dot Color
$wp_customize->add_setting('slider_slickdot_color', array(
    'default' => '#ffffff',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_slickdot_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Slider Dot Color', 'prime-construction'),
)));

// ///////// Active Slick Dot Color
$wp_customize->add_setting('slider_activeslickdot_color', array(
    'default' => '#4d617a',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_activeslickdot_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Active Slider Dot Color', 'prime-construction'),
)));

/////////////////////Button Color///////////////////////
$wp_customize->add_setting('slider_buttontext1_color', array(
    'default' => '#000',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_buttontext1_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Read More Button Color', 'prime-construction'),
)));

$wp_customize->add_setting('slider_buttonbg1_color', array(
    'default' => '#fff',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_buttonbg1_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Read More Button Background Color', 'prime-construction'),
)));

$wp_customize->add_setting('slider_buttontext2_color', array(
    'default' => '#fff',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_buttontext2_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Contact Button Color', 'prime-construction'),
)));

$wp_customize->add_setting('slider_buttonbg2_color', array(
    'default' => '#3F536D',
    'transport' => 'refresh',
    'sanitize_callback' => 'sanitize_hex_color',
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'slider_buttonbg2_color', array(
    'section' => 'slider_text_colors_section',
    'description' => __('Contact Background Color', 'prime-construction'),
)));

// ----------------------------------------------------------

/** Slider Structure section */

$wp_customize->add_section(
    'slider_structure_section',
    array(
        'title' => __('Structure', 'prime-construction'),
        'priority' => 3,
        'panel' => 'lvl_2_parent_panel',
    )
);

$wp_customize->add_setting('featured_slider_title_case', array(
    'default' => 'Uppercase',
    'sanitize_callback' => 'prime_construction_sanitize_choices',
));
$wp_customize->add_control('featured_slider_title_case', array(
    'type' => 'select',
    'label' => __('Title Case', 'prime-construction'),
    'choices' => array(
        'Uppercase' => __('Uppercase', 'prime-construction'),
        'Lowercase' => __('Lowercase', 'prime-construction'),
        'Capitalize' => __('Capitalize', 'prime-construction'),
        'None' => __('None', 'prime-construction')
    ),
    'section' => 'slider_structure_section',
));

$wp_customize->add_setting('featured_slider_subtitle_case', array(
    'default' => 'Capitalize',
    'sanitize_callback' => 'prime_construction_sanitize_choices',
));
$wp_customize->add_control('featured_slider_subtitle_case', array(
    'type' => 'select',
    'label' => __('Sub Title Case', 'prime-construction'),
    'choices' => array(
        'Uppercase' => __('Uppercase', 'prime-construction'),
        'Lowercase' => __('Lowercase', 'prime-construction'),
        'Capitalize' => __('Capitalize', 'prime-construction'),
        'None' => __('None', 'prime-construction')
    ),
    'section' => 'slider_structure_section',
));