<?php 
    $wp_customize->add_section(
        'features_area',
        array(
            'title' => __( 'Feature Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );

    $wp_customize->add_setting(
        'features_area_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'features_area_disable',
            array(
                'settings'      => 'features_area_disable',
                'section'       => 'features_area',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    ); 

backgroundManager($wp_customize, 'featuresus', 'features_area', $color='#F6E8DA', get_template_directory_uri().'/images/default.png', 'img');

lzCustomLable($wp_customize, 'featuresarea_padding', 'features_area', 'Section Padding');

$wp_customize->add_setting(
    'features_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'features_areaTpadding',
    array(
        'settings'      => 'features_areaTpadding',
        'section'       => 'features_area',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'features_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5.7em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'features_areaBpadding',
    array(
        'settings'      => 'features_areaBpadding',
        'section'       => 'features_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'fea_maintitle_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'fea_maintitle_subtitle_heading',
        array(
            'settings'      => 'fea_maintitle_subtitle_heading',
            'section'       => 'features_area',
            'label'         => __( 'Section Heading', 'luzuk' ),
        )
    )
);

$wp_customize->add_setting(
    'fea_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Our Feature', 'luzuk' )
    )
);
$wp_customize->add_control(
    'fea_maintitle',
    array(
        'settings'      => 'fea_maintitle',
        'section'       => 'features_area', 
        'type'          => 'text',
        'label'         => __( 'Heading', 'luzuk' )
    )
);

addColorPalatOption($wp_customize, 'features_area_heading', 'features_area', 'Heading Color', '#543602');

addColorPalatOption($wp_customize, 'features_area_headingdot1', 'features_area', 'Heading Border Color', '#543602');

$wp_customize->add_setting('featuresus_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'featuresus_npp_heading',
        array(
            'settings'      => 'featuresus_npp_heading',
            'section'       => 'features_area',
            'label'         => __( 'Number Of Feature Box ', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('featuresus_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 5));
$wp_customize->add_control(
    'featuresus_npp_count',
    array(
        'settings'      => 'featuresus_npp_count',
        'section'       => 'features_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Feature Box To Show ', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9)
    )
);

//features PAGES
for( $i = 1; $i <= 9; $i++ ){
    $wp_customize->add_setting(
        'featuresus_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'featuresus_header'.$i,
            array(
                'settings'      => 'featuresus_header'.$i,
                'section'       => 'features_area',
                'label'         => __( 'Feature Box ', 'luzuk-premium' ).$i
            )
        )
    );

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

lzAddElement($wp_customize, 'featuresus_page_title'.$i, 'features_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Flavours Tea');

lzAddElement($wp_customize, 'featuresus_page_text'.$i, 'features_area', $type = 'textarea', $label="Text", $callback ='luzuk_sanitize_text', $default='Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed porta pharetra mauris, sed dapibus ex maximus nec.');

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

}

lzCustomLable($wp_customize, 'featuresarea_clr', 'features_area', 'Features Section Color');

// icon bg
addColorPalatOption($wp_customize, 'features_area_icon1bg', 'features_area', 'Box BG Color ', '#F9CDA0');

// icon bg
addColorPalatOption($wp_customize, 'features_area_pageicon', 'features_area', 'Box Icon Color ', '#543602');

addColorPalatOption($wp_customize, 'features_area_pagetitle', 'features_area', 'Box Title Color', '#332102');

addColorPalatOption($wp_customize, 'features_textclr', 'features_area', 'Box Text Color', '#5D5C5C');

lzCustomLable($wp_customize, 'Sec_imgdisplay', 'features_area' , 'Bottom Image Display Setting');

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