<?php 
// TESTIMONIALS SECTION START HERE 
/*============TESTIMONIALS SECTION PANEL============*/
$wp_customize->add_section(
    'testimonialals_section',
    array(
        'title'         => __( 'Testimonials Section', 'luzuk-premium' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);
    //ENABLE/DISABLE TESTIMONIALS SECTION
$wp_customize->add_setting(
    'testimonialals_section_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'testimonialals_section_disable',
        array(
            'settings'      => 'testimonialals_section_disable',
            'section'       => 'testimonialals_section',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            )   
        )
    )
);

backgroundManager($wp_customize, 'testimonials', 'testimonialals_section', $color='#f7f7f7', get_template_directory_uri().'/images/default-gray.png', 'img');

$wp_customize->add_setting(
    'testimonialals_title_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'testimonialals_title_subtitle_heading',
        array(
            'settings'      => 'testimonialals_title_subtitle_heading',
            'section'       => 'testimonialals_section',
            'label'         => __( 'Section Title', 'luzuk-premium' ),
        )
    )
);
$wp_customize->add_setting(
    'testimonialals_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'TESTIMONIALS', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'testimonialals_title',
    array(
        'settings'      => 'testimonialals_title',
        'section'       => 'testimonialals_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'luzuk-premium' )
    )
);

// Heading color
addColorPalatOption($wp_customize, 'testimonialals_HeadingColor', 'testimonialals_section', 'Heading color', '#2d2d2d');

// Heading border color
addColorPalatOption($wp_customize, 'testimonialals_HeadingborderColor', 'testimonialals_section', 'Section Heading border color', '#D79800');

$wp_customize->add_setting('luzuk_test_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_test_npp_heading',
        array(
            'settings'      => 'luzuk_test_npp_heading',
            'section'       => 'testimonialals_section',
            'label'         => __( 'Number Of Client to show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_test_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 1));
$wp_customize->add_control(
    'luzuk_test_npp_count',
    array(
        'settings'      => 'luzuk_test_npp_count',
        'section'       => 'testimonialals_section',
        'type'          => 'select',
        'label'         => __( 'Number of Client to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

// TESTIMONIALS PAGES
    $TesimonialsSingleChoice[] = 'select';
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'testimonialals_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'testimonialals_heading'.$i,
            array(
                'settings'      => 'testimonialals_heading'.$i,
                'section'       => 'testimonialals_section',
                'label'         => __( 'Our Clients ', 'luzuk-premium' ).$i,
            )
        )
    );
    if(is_array($TesimonialsSingleChoice)){
        $wp_customize->add_setting(
            'testimonialals_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'testimonialals_page'.$i,
            array(
                'settings'      => 'testimonialals_page'.$i,
                'section'       => 'testimonialals_section',
                'type'=> 'select',
                'label'         => __( 'Select A Client', 'luzuk-premium' ),
                'choices' => $TesimonialsSingleChoice,
            )
        );
        
    }else{
        $wp_customize->add_setting('luzuk_premium_testimonials_section_lbl'.$i, array('sanitize_callback'=>'luzuk_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_Info_Text( 
                $wp_customize,
                'luzuk_premium_testimonials_section_lbl'.$i,
                array(
                    'settings'      => 'luzuk_premium_testimonials_section_lbl'.$i,
                    'section'       => 'testimonialals_section',
                    'label'         => __( 'Note:', 'luzuk-premium' ),  
                    'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the Testimonials in a page', 'luzuk-premium' ),
                )
            )
        );
    }
}

// Text color
addColorPalatOption($wp_customize, 'testimonialals_TextColor', 'testimonialals_section', 'Testimonial color', '#323232');

// designation color
addColorPalatOption($wp_customize, 'testimonialals_desgColor', 'testimonialals_section', 'Designation color', '#D79800');

// title color
addColorPalatOption($wp_customize, 'testimonialals_TitleColor', 'testimonialals_section', 'Client name color', '#2d2d2d');

// designation hover color
addColorPalatOption($wp_customize, 'testimonialals_desghoverColor', 'testimonialals_section', 'Designation hover color', '#2d2d2d');

// title hover color
addColorPalatOption($wp_customize, 'testimonialals_TitlehoverColor', 'testimonialals_section', 'Client name hover color', '#D79800');

// indicator color
addColorPalatOption($wp_customize, 'testimonialals_indicatorColor', 'testimonialals_section', 'Slider indicator color', '#9c9a9b');

// indicator active color
addColorPalatOption($wp_customize, 'testimonialals_activeindicatorColor', 'testimonialals_section', 'Slider indicator active color', '#D79800');


// indicator hover color
addColorPalatOption($wp_customize, 'testimonialals_hoverindicatorColor', 'testimonialals_section', 'Slider indicator hover color', '#D79800');


//BOX color
addColorPalatOption($wp_customize, 'testimonialals_contentboxColor', 'testimonialals_section', 'Box color', '#fff');

// TESTIMONIALS SECTION END HERE 