<?php  

$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' )
                ),
            )
        )
    );

backgroundManager($wp_customize, 'feature', 'feature_area', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'featuresection_padding', 'feature_area', ' Section Padding ');

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

lzCustomLable($wp_customize, 'featuresection_leftbx', 'feature_area', ' Section Left Box ');

$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 To Show', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('feature_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'feature_npp_count',
    array(
        'settings'      => 'feature_npp_count',
        'section'       => 'feature_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Feature To Show', 'Luzuk Premium' ),
        'choices'=>array(1,2,3,4)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 4; $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 Box ', 'Luzuk Premium' ).$i
            )
        )
    );

    lzAddElement($wp_customize, 'feature_page_title'.$i, 'feature_area', $type = 'text', $label="Feature Title", $callback ='luzuk_sanitize_text', $default='Quality Products');

    lzAddElement($wp_customize, 'feature_page_txt'.$i, 'feature_area', $type = 'textarea', $label="Feature Text", $callback ='luzuk_sanitize_text', $default='Lorem ipsum dolor sit amet, consectetur adipiscing elit, magna aliqua.');
}

lzCustomLable($wp_customize, 'feaimg', 'feature_area' , 'Section Image');

$wp_customize->add_setting(
    'feature_image',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);

$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'feature_image',
        array(
            'section' => 'feature_area',
            'settings' => 'feature_image',
            'description' => __('Recommended Image Size: 417X754px', 'luzuk-premium')
        )
    )
);

lzCustomLable($wp_customize, 'feaimgtxt', 'feature_area' , 'Section Image Text');

$wp_customize->add_setting(
    'feature_imgtxt',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'premium wine brand. premium wine brand.', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'feature_imgtxt',
    array(
        'settings'      => 'feature_imgtxt',
        'section'       => 'feature_area',
        'type'          => 'text',
        'label'         => __( 'Image Text', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'feature_imgtxtClr', 'feature_area', 'Image Text Color', '#000');

lzCustomLable($wp_customize, 'featuresection_rightbx', 'feature_area', ' Section Right Box ');

$wp_customize->add_setting('feature_npp_rightheading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'feature_npp_rightheading',
        array(
            'settings'      => 'feature_npp_rightheading',
            'section'       => 'feature_area',
            'label'         => __( 'Number Of Feature To Show', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('feature_npp_rightcount',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'feature_npp_rightcount',
    array(
        'settings'      => 'feature_npp_rightcount',
        'section'       => 'feature_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Feature To Show', 'Luzuk Premium' ),
        'choices'=>array(1,2,3,4)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 4; $i++ ){
    $wp_customize->add_setting(
        'feature_rightheader'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'feature_rightheader'.$i,
            array(
                'settings'      => 'feature_rightheader'.$i,
                'section'       => 'feature_area',
                'label'         => __( 'Feature Box ', 'Luzuk Premium' ).$i
            )
        )
    );

lzAddElement($wp_customize, 'feature_page_title_right'.$i, 'feature_area', $type = 'text', $label="Feature Title", $callback ='luzuk_sanitize_text', $default='Quality Products');

lzAddElement($wp_customize, 'feature_page_txt_right'.$i, 'feature_area', $type = 'textarea', $label="Feature Text", $callback ='luzuk_sanitize_text', $default='Lorem ipsum dolor sit amet, consectetur adipiscing elit, magna aliqua.');    
}

lzCustomLable($wp_customize, 'feature_sectioncolor', 'feature_area', 'Feature Section Color');

addColorPalatOption($wp_customize, 'feature_secBGClr', 'feature_area', 'Features BG Color', '#DFDABA');

addColorPalatOption($wp_customize, 'feature_conbxBGClr', 'feature_area', 'Content BG Color', '#fff');

addColorPalatOption($wp_customize, 'feature_titleClr', 'feature_area', 'Title Color', '#000');

addColorPalatOption($wp_customize, 'feature_txtClr', 'feature_area', 'Text Color', '#000');
