<?php
$wp_customize->add_section(
    'features_area',
    array(
        'title' => __('Features 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, 'features', 'features_area', $color='#e6eef7', get_template_directory_uri().'/images/default-gray.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'           => __( '3em', '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_title_heading',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'fea_title_heading',
            array(
                'settings'      => 'fea_title_heading',
                'section'       => 'features_area',
                'label'         => __( 'Section Heading & Sub Heading', 'luzuk-premium' ),
            )
        )
    );    

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

addColorPalatOption($wp_customize, 'fea_sectitle_color', 'features_area', 'Section Heading Color ', '#303030');

    $wp_customize->add_setting(
        'fea_subtitle',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.', 'luzuk-premium' )
        )
    );
    $wp_customize->add_control(
        'fea_subtitle',
        array(
            'settings'      => 'fea_subtitle',
            'section'       => 'features_area',
            'type'          => 'textarea',
            'label'         => __( 'Section Sub Heading', 'luzuk-premium' )
        )
    );
    
addColorPalatOption($wp_customize, 'fea_secsubtitle_color', 'features_area', 'Section Sub Heading Color ', '#6e7174');

lzCustomLable($wp_customize, 'featuresarea_lhsimg', 'features_area', 'Left Image');
$wp_customize->add_setting(
    'fea_image5',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'fea_image5',
        array(
            'section' => 'features_area',
            'settings' => 'fea_image5',
            'description' => __('Recommended Image Size: 470X590px', 'luzuk-premium')
        )
    )
);


$wp_customize->add_setting('features_area_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'features_area_lbl',
        array(
            'settings'      => 'features_area_lbl',
            'section'       => 'features_area',
            'label'         => __( 'Note1:', 'Luzuk' ),  
            'description'   => __( 'Changes Will Not Reflect Unless You Select An Icon For Page', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('features_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'features_npp_heading',
        array(
            'settings'      => 'features_npp_heading',
            'section'       => 'features_area',
            'label'         => __( 'Number Of Feature Plan To Show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('features_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 5));
$wp_customize->add_control(
    'features_npp_count',
    array(
        'settings'      => 'features_npp_count',
        'section'       => 'features_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Feature Plan To Show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8)
    )
);
for( $i = 1; $i <= 8; $i++ ){
    $wp_customize->add_setting(
        'features_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'features_header'.$i,
            array(
                'settings'      => 'features_header'.$i,
                'section'       => 'features_area',
                'label'         => __( 'Features plan ', 'luzuk-premium' ).$i
            )
        )
    );


$wp_customize->add_setting(
        'fea_page_icon'.$i,
        array(
            'default'           => 'fa fa-user-o',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'fea_page_icon'.$i,
            array(
                'settings'      => 'fea_page_icon'.$i,
                'section'       => 'features_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'Luzuk' ),
            )
        )
    );


lzAddElement($wp_customize, 'fea_page_title'.$i, 'features_area', $type = 'text', $label="Section Title", $callback ='luzuk_sanitize_text', $default='FULL SERVICE');

lzAddElement($wp_customize, 'fea_page_description'.$i, 'features_area', $type = 'textarea', $label="Description", $callback ='luzuk_sanitize_text', $default='Lorem ipsum dolor sit amet, consectetur adipiscing elit,');

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

}

lzCustomLable($wp_customize, 'fea_sectionclr', 'features_area', 'Section Color');


addColorPalatOption($wp_customize, 'featuresarea_BoxttlColor', 'features_area', 'Section Title Color', '#1d62b8');

addColorPalatOption($wp_customize, 'featuresarea_BoxttlhvColor', 'features_area', 'Section Title Hover Color', '#000');

addColorPalatOption($wp_customize, 'featuresarea_BoxdescColor', 'features_area', 'Section Description Color', '#858585');

addColorPalatOption($wp_customize, 'featuresarea_ficonColor', 'features_area', 'Section Icon Color', '#000');

addColorPalatOption($wp_customize, 'featuresarea_ficonhoverColor', 'features_area', 'Section Icon Circle Color', '#1d62b8');


