<?php  
//$peccularSliderSingleChoice = getpeccularPostsType('slider');
$wp_customize->add_section(
    'peccular_slider_section',
    array(
        'title' => __( 'Slider', 'peccular' ),
        'panel' => 'peccular_premium_home_panel1',
        'priority' =>18
    )
);



$wp_customize->add_setting('peccular_slider_nav', array(
       'sanitize_callback' => 'wp_kses_post',
    ));

    $wp_customize->add_control(new peccular_Tab_Control($wp_customize, 'peccular_slider_nav', array(
       'section' => 'peccular_slider_section',
       'priority' => 1,
       'buttons' => array(
          array(
             'name' => esc_html__('General', 'peccular-premium'),
            'icon' => 'dashicons dashicons-welcome-write-blog',
            'fields' => array(
                'slider_section_show_content',
                'peccular_slider_image_opacity',
                'slideranimations_icon_display'
            ),
            'active' => true,
         ),
          array(
            'name' => esc_html__('Style', 'peccular-premium'),
            'icon' => 'dashicons dashicons-art',
            'fields' => array(
                'peccular_slider_heading_color',
                'peccular_slider_headingone_color',
                'peccular_slider_headinghov_color',
                'peccular_slider_headingSpan_color',
                'peccular_slider_text_color',
                'peccular_slider_buttontext_color1',  
                'peccular_slider_buttonbg_color1', 
                'peccular_slider_buttonborder_color1', 
               
                'peccular_slider_overlay1_color',
                'peccular_slider_overlay2_color', 
                'peccular_slider_overlay3_color',
                'peccular_slider_overlay4_color',
                'peccular_slider_buttontxthv_color1',
                'peccular_slider_buttonhovbrdr_color1',
                'peccular_slider_buttontext_color2',
                'peccular_slider_buttonbg_color2',
                'peccular_slider_buttontxthv_color2',
                'peccular_slider_buttonBGhv_color2',
                'peccular_slider_buttonbghv_color1'
                

            ),
         ),
          array(
            'name' => esc_html__('Layout', 'peccular-premium'),
            'icon' => 'dashicons dashicons-layout',
            'fields' => array(
                'peccular_slider_section_width'
            ),
         )
        ),
    )));

$wp_customize->add_setting(
    'slider_section_show_content',
    array(
        'sanitize_callback' => 'peccular_sanitize_text',
    )
);
$wp_customize->add_control(
    new peccular_Switch_Control(
        $wp_customize,
        'slider_section_show_content',
        array(
            'settings'      => 'slider_section_show_content',
            'section'       => 'peccular_slider_section',
            'label'         => __( 'Hide Title And Description On Slider', 'Luzuk' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk' ),
                'off' => __( 'No', 'Luzuk' )
            ),
        )
    )
);

    // $wp_customize->add_setting('peccular_slider_image_opacity',array(
    //     'default' => 0.4,
    //     'sanitize_callback' => 'peccular_sanitize_float'
    // ));
    // $wp_customize->add_control(new peccular_Custom_Control( $wp_customize, 'peccular_slider_image_opacity',array(
    // 'label' => __('Slider Content Box Opacity','peccular'),
    // 'section' => 'peccular_slider_section',
    // 'input_attrs' => array(
    //         'min' => 0,
    //         'max' => 1,
    //         'step' => 0.1,
    //     ),
    // )));


    $wp_customize->add_setting('peccular_slider_section_width',array(
        'default' => 'Full Width',
        'sanitize_callback' => 'peccular_sanitize_choices',
    ));
    $wp_customize->add_control('peccular_slider_section_width',array(
        'type' => 'select',
        'label' => __('Section Width','peccular'),
        'choices' => array (
            'Box Width' => __('Box Width','peccular'),
            'Full Width' => __('Full Width','peccular')
        ),
        'section' => 'peccular_slider_section',
    )); 


addColorPalatOption($wp_customize, 'peccular_slider_headingone_color', 'peccular_slider_section', 'Heading Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_heading_color', 'peccular_slider_section', 'Span Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_headinghov_color', 'peccular_slider_section', 'Heading Hover Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_text_color', 'peccular_slider_section', 'Text Color', '');

// addColorPalatOption($wp_customize, 'peccular_slider_buttontext_color2', 'peccular_slider_section', ' Button 1 Text Color', '');
// addColorPalatOption($wp_customize, 'peccular_slider_buttonbg_color2', 'peccular_slider_section', ' Button 1 BG Color', '');
// addColorPalatOption($wp_customize, 'peccular_slider_buttontxthv_color2', 'peccular_slider_section', ' Button 1 Hover Text Color', '');
// addColorPalatOption($wp_customize, 'peccular_slider_buttonBGhv_color2', 'peccular_slider_section', ' Button 1 Hover BG Color', '');

addColorPalatOption($wp_customize, 'peccular_slider_buttontext_color1', 'peccular_slider_section', ' Button Text Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_buttonbg_color1', 'peccular_slider_section', ' Button BG Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_buttonbghv_color1', 'peccular_slider_section', ' Button Hover BG Color', '');
addColorPalatOption($wp_customize, 'peccular_slider_buttonhovbrdr_color1', 'peccular_slider_section', ' Button Hover Slider Color', '');

addColorPalatOption($wp_customize, 'peccular_slider_buttontxthv_color1', 'peccular_slider_section', ' Button Hover Text Color', '');

addColorPalatOption($wp_customize, 'peccular_slider_overlay1_color', 'peccular_slider_section', 'Overlay Color', '');


// to show & hide Heading Image
$wp_customize->add_setting( 'slideranimations_icon_display' , array( 'default' => true, 'transport' => 'refresh', ) );
 $wp_customize->add_control( 'slideranimations_icon_display', array( 'label' => 'Animation Image Display', 'section' => 'peccular_slider_section', 'settings' => 'slideranimations_icon_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Image', 'hide' => 'Hide Image', ), ) );  


 ?>