<?php
/**
 * Createing an Feature pannel for customizer
 *
 */

// START Feature SECTION 
    $wp_customize->add_section(
        'feature_area',
        array(
            'title' => __( 'Feature Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'feature_area_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'feature_area_disable',
            array(
                'settings'      => 'feature_area_disable',
                'section'       => 'feature_area',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );

lzCustomLable($wp_customize, 'luzuk_sec_featuresectionpadding', 'feature_area', 'Set Section Padding:');

$wp_customize->add_setting(
    'feature_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '9em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'feature_areaTpadding',
    array(
        'settings'      => 'feature_areaTpadding',
        'section'       => 'feature_area',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'feature_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '9em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'feature_areaBpadding',
    array(
        'settings'      => 'feature_areaBpadding',
        'section'       => 'feature_area',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'luzuk-premium' )
    )
);


backgroundManager($wp_customize, 'feature', 'feature_area', $color='#fff', get_template_directory_uri().'/images/bgimg.png', 'color');

    $wp_customize->add_setting(
    'feature_title_sub_title_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'feature_title_sub_title_heading',
        array(
            'settings'      => 'feature_title_sub_title_heading',
            'section'       => 'feature_area',
            'label'         => __( 'Section Title', 'luzuk-premium' ),
        )
    )
);   
$wp_customize->add_setting(
    'feature_subheading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Feature', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'feature_subheading',
    array(
        'settings'      => 'feature_subheading',
        'section'       => 'feature_area',
        'type'          => 'text',
        'label'         => __( 'Sub Title', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'feature_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'WHY CHOOSE US', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'feature_maintitle',
    array(
        'settings'      => 'feature_maintitle',
        'section'       => 'feature_area',
        'type'          => 'text',
        'label'         => __( 'Title', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'featurearea_sectitle_color', 'feature_area', 'Sub Title color ', '#ff5317');
addColorPalatOption($wp_customize, 'featurearea_sectitleborder_color', 'feature_area', 'Sub Title Border Color ', '#ff5317');
addColorPalatOption($wp_customize, 'featurearea_sectitlespan_color', 'feature_area', 'Title color ', '#001b40');


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

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

     $wp_customize->add_setting(
        'feature_page_icon'.$i,
        array(
            'default'           => 'fa fa-money',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'feature_page_icon'.$i,
            array(
                'settings'      => 'feature_page_icon'.$i,
                'section'       => 'feature_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );

lzAddElement($wp_customize, 'feature_page_title_'.$i, 'feature_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Reasonable Price');
    
}
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'feature_title_sub_title_heading',
        array(
            'settings'      => 'feature_title_sub_title_heading',
            'section'       => 'feature_area',
            'label'         => __( 'Section Color', 'luzuk-premium' ),
        )
    )
); 
addColorPalatOption($wp_customize, 'featurearea_boxicon_backgroundcolor', 'feature_area', 'Box Icon Box Background color', '#fff'); 
addColorPalatOption($wp_customize, 'featurearea_boxicon_color', 'feature_area', 'Box Icon color', '#041f44'); 
addColorPalatOption($wp_customize, 'featurearea_boxtext_color', 'feature_area', 'Box Text color', '#1b3050');



  
    
// End feature section 