<?php
$wp_customize->add_section(
    'newsletter_area',
    array(
        'title' => __('Newsletter Section', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel'
    )
);
$wp_customize->add_setting(
    'newsletter_area_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'newsletter_area_disable',
        array(
            'settings'      => 'newsletter_area_disable',
            'section'       => 'newsletter_area',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            ),
        )
    )
);

backgroundManager($wp_customize, 'newsletter', 'newsletter_area', $color='#f4f3f3', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'newsletterarea_padding', 'newsletter_area', 'Set Section Padding:');

$wp_customize->add_setting(
    'newsletter_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'newsletter_areaTpadding',
    array(
        'settings'      => 'newsletter_areaTpadding',
        'section'       => 'newsletter_area',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'newsletter_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'newsletter_areaBpadding',
    array(
        'settings'      => 'newsletter_areaBpadding',
        'section'       => 'newsletter_area',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk-premium' )
    )
);



// lzCustomLable($wp_customize, 'newsletter_animation_displayl', 'newsletter_area', 'Newsletter Icon Image Setting:');
//       $wp_customize->add_setting(
//         'newsletter_inn_image',
//         array(
//             'sanitize_callback' => 'esc_url_raw'
//         )
//     );
//     $wp_customize->add_control(
//         new WP_Customize_Image_Control(
//             $wp_customize,
//             'newsletter_inn_image',
//             array(
//                 'section' => 'newsletter_area',
//                 'settings' => 'newsletter_inn_image',
//                 'description' => __('Newsletter Icon Image', 'luzuk-premium')
//             )
//         )
//     );


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

$wp_customize->add_setting(
    'newsletter_page_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '<span>Get only</span> new and unique update from this newsletter.', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'newsletter_page_maintitle',
    array(
        'settings'      => 'newsletter_page_maintitle',
        'section'       => 'newsletter_area',
        'type'          => 'textarea',
        'label'         => __( 'Heading for section', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'newsletterarea_title_color', 'newsletter_area', 'Section Heading Color', '#131313');

addColorPalatOption($wp_customize, 'newsletter_page_titleBorderColor', 'newsletter_area', 'Section Heading Highlight Color', '#131313');

lzCustomLable($wp_customize, 'newsletter_Form_label', 'newsletter_area', 'Newsletter Form Shortcode');

lzAddElement($wp_customize, 'luzuk_newsletter_shortcode', 'newsletter_area', 'textarea', $label="Form Shortcode", 'luzuk_sanitize_text', '[your shortcode]');

//form input text / placeholder color
addColorPalatOption($wp_customize, 'newsletter_forminputtextColor', 'newsletter_area', 'Form Input text / Placeholder Color', '#a1a1a1');

//form input bg color
addColorPalatOption($wp_customize, 'newsletter_forminputbgColor', 'newsletter_area', 'Form Input Background Color', '#fff');

//form input border color
addColorPalatOption($wp_customize, 'newsletter_forminputborderColor', 'newsletter_area', 'Form Input Border Color', '#e5e5e5');

//form label color
addColorPalatOption($wp_customize, 'newsletter_formlabelColor', 'newsletter_area', 'Form Label Color', '#101a37');

//form text color
addColorPalatOption($wp_customize, 'newsletter_formtextColor', 'newsletter_area', 'Form Text Color', '#101a37');

//form button text color
addColorPalatOption($wp_customize, 'newsletter_formbuttontextColor', 'newsletter_area', 'Form Button Text Color', '#fff');

//form button background color
addColorPalatOption($wp_customize, 'newsletter_formbuttonbgColor', 'newsletter_area', 'Form Button Background Color', '#ff1944');

//form button text color
addColorPalatOption($wp_customize, 'newsletter_formbuttontexthoverColor', 'newsletter_area', 'Form Button Text Hover Color', '#ff1944');

//form button background color
addColorPalatOption($wp_customize, 'newsletter_formbuttonbghoverColor', 'newsletter_area', 'Form Button Background Hover Color', '#000');
