<?php  
// TESTIMONIALS SECTION START HERE 

$wp_customize->add_section(
    'testimonials_area',
    array(
        'title'         => __( 'Testimonials Section', 'Luzuk Premium' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);
    //ENABLE/DISABLE TESTIMONIALS SECTION
$wp_customize->add_setting(
    'testimonials_area_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'testimonials_area_disable',
        array(
            'settings'      => 'testimonials_area_disable',
            'section'       => 'testimonials_area',
            'label'         => __( 'Disable Section', 'Luzuk Premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk Premium' ),
                'off' => __( 'No', 'Luzuk Premium' )
            )   
        ) 
    )
);
 
backgroundManager($wp_customize, 'testimonials', 'testimonials_area', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');




lzCustomLable($wp_customize, 'luzuk_sec_testsectionpadding', 'testimonials_area', 'Set Padding For Testimonial Section:');

$wp_customize->add_setting(
    'sec_testimonialsectionTpadding', 
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '0em', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionTpadding',
    array(
        'settings'      => 'sec_testimonialsectionTpadding',
        'section'       => 'testimonials_area',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Top Padding', 'Luzuk Premium' )
    )
);
$wp_customize->add_setting(
    'sec_testimonialsectionBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '0em', 'Luzuk Premium' )
    )
);
$wp_customize->add_control(
    'sec_testimonialsectionBpadding',
    array(
        'settings'      => 'sec_testimonialsectionBpadding',
        'section'       => 'testimonials_area',
        'type'          => 'text',
        'label'         => __( 'Testimonial Section Bottom Padding', 'Luzuk Premium' )
    )
);

lzCustomLable($wp_customize, 'testsecinn_img', 'testimonials_area', 'Section slider Background Imagr Color Setting:');

backgroundManager($wp_customize, 'testiinnimg', 'testimonials_area', $color='#fff', get_template_directory_uri().'/images/Testibg.jpg', 'color');

lzCustomLable($wp_customize, 'testi_section_overlayop', 'testimonials_area', 'Section Box Overlay & Opacity settings:');

$wp_customize->add_setting(
'testi_overlay_color', array(
'default' => '#f27968',
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'testi_overlay_color',array(
'settings' => 'testi_overlay_color',
'section' => 'testimonials_area',
'label' => __( 'Apply Overlay Color', 'Luzuk' ),
'description' => __( 'The color used for the overlay in the banner.', 'luzuk-premium' ),
)
)
);

$wp_customize->add_setting(
'cover_testim_template_overlay_opacity',
array(
'default' => 65,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
)
);

$wp_customize->add_control(
'cover_testim_template_overlay_opacity',
array(
'label' => __( 'Overlay Opacity', 'luzuk-premium' ),
'description' => __( 'Make sure that the contrast is high enough so that the text is readable.', 'luzuk-premium' ),
'section' => 'testimonials_area',
'type' => 'range',
'input_attrs' => luzuk_customize_opacity_range(),
)
);

$wp_customize->selective_refresh->add_partial(
'cover_testim_template_overlay_opacity',
array(
'selector' => '.cover-color-overlay',
'type' => 'cover_opacity',
)
);


$TesimonialsSingleChoice[] = 'select';
if(!is_array($TesimonialsSingleChoice)){
    $wp_customize->add_setting('testimonials_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
    $wp_customize->add_control(
        new luzuk_Info_Text( 
            $wp_customize,
            'testimonials_area_lbl',
            array(
                'settings'      => 'testimonials_area_lbl',
                'section'       => 'testimonials_area',
                'label'         => __( 'Note:', 'Luzuk Premium' ), 
                'description'   => __( '<strong>Changes will not reflect unless you select the Testimonials.</strong> <br/>Please add the Testimonials from "Testimonials menu" and then select Testimonial to show information.', 'Luzuk Premium' ),
            )
        )
    );
}
$wp_customize->add_setting('luzuk_premium_testimonials_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_premium_testimonials_area_lbl',
        array(
            'settings'      => 'luzuk_premium_testimonials_area_lbl',
            'section'       => 'testimonials_area',
            'label'         => __( 'Note:', 'Luzuk Premium' ), 
            'description'   => __( 'Just place the shortcode "[TESTIMONIALS]" in your page to list the Testimonials in a page ', 'Luzuk Premium' ),
        )
    )
);
//TESTIMONIALS PAGES
for( $i = 1; $i < 7; $i++ ){
    $wp_customize->add_setting(
        'luzuk_testimonials_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_testimonials_heading'.$i,
            array(
                'settings'      => 'luzuk_testimonials_heading'.$i,
                'section'       => 'testimonials_area',
                'label'         => __( 'Testimonial', 'Luzuk Premium' ).$i,
            )
        )
    );
    $wp_customize->add_setting(
        'testimonials_page'.$i,
        array(
            'sanitize_callback' => 'absint'
        )
    );
    $wp_customize->add_control(
        'testimonials_page'.$i,
        array(
            'settings'      => 'testimonials_page'.$i,
            'section'       => 'testimonials_area',
            'type'=> 'select',
            'label'         => __( 'Select a Client Testimonials', 'Luzuk Premium' ),
            'choices' => $TesimonialsSingleChoice,
        )
    );
}



lzCustomLable($wp_customize, 'luzuk_sec_testsclr', 'testimonials_area', 'Section Color');

addColorPalatOption($wp_customize, 'luzuk_testimonials_boxcolor', 'testimonials_area', 'Section Contain Box Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_testimonials_textcolor', 'testimonials_area', 'Section Testimonial Text Color', '#464545');

addColorPalatOption($wp_customize, 'luzuk_testimonials_clientimgbordercolor', 'testimonials_area', ' Image Border Color', '#fff');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Namecolor', 'testimonials_area', 'Section Client Name Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Namehvcolor', 'testimonials_area', 'Section Client Name Hover Color', '#f27968');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Desgcolor', 'testimonials_area', 'Section Client Designation Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_testimonials_Dotclr', 'testimonials_area', 'Section Slider Dot Color', '#000');

addColorPalatOption($wp_customize, 'luzuk_testimonials_acveDotclr', 'testimonials_area', 'Section Slider Active Dot Color', '#f27968');

lzCustomLable($wp_customize, 'testimonials_videobx', 'testimonials_area', 'Video Box ');


 $wp_customize->add_setting('vide_url', array(/*'sanitize_callback' => 'esc_url_raw',*/ 'default'=>'Add your video iframe Code'));
 $wp_customize->add_control('vide_url', array('settings'=>'vide_url', 'section'=>'testimonials_area','type'=>'textarea', 'label'=> __('video iframe Code', 'Luzuk')));

 addColorPalatOption($wp_customize, 'luzuk_testimvdebxclr', 'testimonials_area', 'Section Video Box Background Color', '#f27968');

?>