<?php
/**
 * Createing an featured pannel for customizer
 *
 */
// START featured SECTION 
    $wp_customize->add_section(
        'premium_featured_section',
        array(
            'title' => __( 'Our Features  Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'premium_featured_section_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'premium_featured_section_disable',
            array(
                'settings'      => 'premium_featured_section_disable',
                'section'       => 'premium_featured_section',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );

backgroundManager($wp_customize, 'ourfeature', 'premium_featured_section', $color='#f9f9f9', get_template_directory_uri().'/images/default-gray.png', 'img'); 

lzCustomLable($wp_customize, 'featuredsectionleft_padding', 'premium_featured_section', ' Section Padding Setting');

$wp_customize->add_setting(
    'featuredsection_toppadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'featuredsection_toppadding',
    array(
        'settings'      => 'featuredsection_toppadding',
        'section'       => 'premium_featured_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'featuredsection_bottompadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'featuredsection_bottompadding',
    array(
        'settings'      => 'featuredsection_bottompadding',
        'section'       => 'premium_featured_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);
// $wp_customize->add_setting(
//     'featuredsection_leftpadding',
//     array(
//         'sanitize_callback' => 'luzuk_sanitize_text',
//         'default'           => __( '0em', 'luzuk-premium' )
//     )
// );
// $wp_customize->add_control(
//     'featuredsection_leftpadding',
//     array(
//         'settings'      => 'featuredsection_leftpadding',
//         'section'       => 'premium_featured_section',
//         'type'          => 'text',
//         'label'         => __( 'Section Left Padding', 'luzuk-premium' )
//     )
// );
// $wp_customize->add_setting(
//     'featuredsection_rightpadding',
//     array(
//         'sanitize_callback' => 'luzuk_sanitize_text',
//         'default'           => __( '0em', 'luzuk-premium' )
//     )
// );
// $wp_customize->add_control(
//     'featuredsection_rightpadding',
//     array(
//         'settings'      => 'featuredsection_rightpadding',
//         'section'       => 'premium_featured_section',
//         'type'          => 'text',
//         'label'         => __( 'Section Right Padding', 'luzuk-premium' )
//     )
// );


 $wp_customize->add_setting(
    'featured_title_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'featured_title_heading',
        array(
            'settings'      => 'featured_title_heading',
            'section'       => 'premium_featured_section',
            'label'         => __( 'Section Title', 'luzuk premium' ),
        )
    )
); 

$wp_customize->add_setting(
        'featured_title',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'OUR FEATURES', 'luzuk premium' )
        )
    );
    $wp_customize->add_control(
        'featured_title',
        array(
            'settings'      => 'featured_title',
            'section'       => 'premium_featured_section',
            'type'          => 'text',
            'label'         => __( 'Title for section', 'luzuk premium' )
        )
    );

 // Heading color
addColorPalatOption($wp_customize, 'ourfeature_HeadingColor', 'premium_featured_section', 'Heading Color', '#2b3f59');

addColorPalatOption($wp_customize, 'ourfeature_HeadingbrdColor', 'premium_featured_section', 'Heading Border & Icon Color', '#ff9310');


$wp_customize->add_setting(
        'featured_subtext',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae ante a nibh ornare tristique laoreet ac odio. Donec ac eleifend lacus. Etiam bibendum nec mi non consequat.', 'luzuk premium' )
        )
    );
    $wp_customize->add_control(
        'featured_subtext',
        array(
            'settings'      => 'featured_subtext',
            'section'       => 'premium_featured_section',
            'type'          => 'textarea',
            'label'         => __( 'Sub Heading Text for section', 'luzuk premium' )
        )
    );

addColorPalatOption($wp_customize, 'ourfeature_subHeadingColor', 'premium_featured_section', 'Sub Heading Text Color', '#323232');

$wp_customize->add_setting('featured_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'featured_npp_heading',
        array(
            'settings'      => 'featured_npp_heading',
            'section'       => 'premium_featured_section',
            'label'         => __( 'Number Of featured Plans', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('featured_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'featured_npp_count',
    array(
        'settings'      => 'featured_npp_count',
        'section'       => 'premium_featured_section',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 9; $i++ ){
    $wp_customize->add_setting(
        'featured_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'featured_header'.$i,
            array(
                'settings'      => 'featured_header'.$i,
                'section'       => 'premium_featured_section',
                'label'         => __( 'featured Page ', 'luzuk-premium' ).$i
            )
        )
    );

    //  $wp_customize->add_setting(
    //     'featured_page_icon'.$i,
    //     array(
    //         'default'           => 'fa fa-pie-chart',
    //         'sanitize_callback' => 'luzuk_sanitize_text'
    //     )
    // );        
    // $wp_customize->add_control(
    //     new luzuk_Fontawesome_Icon_Chooser(
    //         $wp_customize,
    //         'featured_page_icon'.$i,
    //         array(
    //             'settings'      => 'featured_page_icon'.$i,
    //             'section'       => 'premium_featured_section',
    //             'type'          => 'icon',
    //             'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
    //         )
    //     )
    // );
lzAddImageElement($wp_customize, 'featured_page_icon'.$i, 'premium_featured_section', $label="Recommended Image Size: 320X350px");
lzAddElement($wp_customize, 'featured_page_title_'.$i, 'premium_featured_section', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='REPAIR');

lzAddElement($wp_customize, 'featured_page_description'.$i, 'premium_featured_section', $type = 'textarea', $label="Description", $callback ='luzuk_sanitize_text', $default='Aliquam erat volutpat. Quisque posuere elit ut efficitur henerit.');
    

lzAddElement($wp_customize, 'featurednew_page_url_'.$i, 'premium_featured_section', $type = 'text', $label="Button Link", $callback ='esc_url', $default='Add link here');

    /*code for button text*/
    $wp_customize->add_setting(
        'featurednew_page_button_title_'.$i,
        array(
            'sanitize_callback'=>'luzuk_sanitize_text',
            'default'=> __('LEARN MORE', 'luzuk premium')
        )
    );
    $wp_customize->add_control(
        'featurednew_page_button_title_'.$i,
        array(
            'settings' =>'featurednew_page_button_title_'.$i,
            'section' => 'premium_featured_section',
            'type'=> 'text',
            'label'=> __('Button Text', 'luzuk premium')
        )
    );

}

lzCustomLable($wp_customize, 'Color', 'premium_featured_section', ' Section Color Setting');

addColorPalatOption($wp_customize, 'ourfeature_imghvColor', 'premium_featured_section', 'Image Hover Color', '#0664ad');
 
     // title color
addColorPalatOption($wp_customize, 'ourfeature_titleColor', 'premium_featured_section', 'Title Color', '#fff');

addColorPalatOption($wp_customize, 'ourfeature_iconbgColor', 'premium_featured_section', 'Title Background Color', '#003f71');

addColorPalatOption($wp_customize, 'ourfeature_iconbghvColor', 'premium_featured_section', 'Title Background Hover Color', '#0664ad');

addColorPalatOption($wp_customize, 'ourfeature_iconbghgColor', 'premium_featured_section', 'Title Highlight Color', '#fddb1f');

 // description color
addColorPalatOption($wp_customize, 'ourfeature_descriptionColor', 'premium_featured_section', 'Description Color', '#535353');

addColorPalatOption($wp_customize, 'ourfeature_iconColor', 'premium_featured_section', 'Button Text & Icon Color', '#003f71');

addColorPalatOption($wp_customize, 'ourfeature_iconhvColor', 'premium_featured_section', 'Button Text & Icon Hover Color', '#003f71');

addColorPalatOption($wp_customize, 'ourfeature_iconbrdColor', 'premium_featured_section', 'Button Text & Icon Border Color', '#003f71');

addColorPalatOption($wp_customize, 'ourfeature_iconbrdhvColor', 'premium_featured_section', 'Button Text & Icon Border Hover Color', '#fddb1f');

addColorPalatOption($wp_customize, 'ourfeature_iconbgvColor', 'premium_featured_section', 'Button Text & Icon Background Color', '#fff');

addColorPalatOption($wp_customize, 'ourfeature_iconbgvhvColor', 'premium_featured_section', 'Button Text & Icon Background Hover Color', '#fddb1f');

         // icon color



// End featured section 