<?php
/**
 * Createing an Our Pets pannel for customizer
 */

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

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


lzCustomLable($wp_customize, 'luzuk_specialoffersectionpadding', 'specialoffer_section', 'Section Padding');

$wp_customize->add_setting(
    'specialofferTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '2.5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'specialofferTpadding',
    array(
        'settings'      => 'specialofferTpadding',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'specialofferBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '1em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'specialofferBpadding',
    array(
        'settings'      => 'specialofferBpadding',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk' ) 
    )
);

lzCustomLable($wp_customize, 'specialofferbox1', 'specialoffer_section', 'Special Offer Box 1');

lzCustomLable($wp_customize, 'specialofferbox1_img', 'specialoffer_section' , 'Select Image');

$wp_customize->add_setting(
    'spbanner_image1',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'spbanner_image1',
        array(
            'section' => 'specialoffer_section',
            'settings' => 'spbanner_image1',
            'description' => __('Recommended Image Size: 650X383px', 'luzuk-premium')
        )
    )
);
$wp_customize->add_setting(
    'spoffersubtitle1a',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Discount', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffersubtitle1a',
    array(
        'settings'      => 'spoffersubtitle1a',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Sub Heading 1', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'spoffersubtitle1',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '20% oFF', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffersubtitle1',
    array(
        'settings'      => 'spoffersubtitle1',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Sub Heading 2', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'spoffertitle1',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Chateau Elegance', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffertitle1',
    array(
        'settings'      => 'spoffertitle1',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Heading', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'spofferbtntxt1',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Shop Now', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spofferbtntxt1',
    array(
        'settings'      => 'spofferbtntxt1',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);

$wp_customize->add_setting('spofferbtntxtlink1',   
    array('default'=> 'add link here', 
    'sanitize_callback' => 'esc_url_raw')
);
$wp_customize->add_control('spofferbtntxtlink1',
    array(
        'settings'      => 'spofferbtntxtlink1',
        'section'       => 'specialoffer_section',
        'type'          => 'url',
        'label'         => __( 'Add Button Link', 'luzuk-premium' )
    )
);

lzCustomLable($wp_customize, 'specialofferbox2', 'specialoffer_section', 'Special Offer Box 2');

lzCustomLable($wp_customize, 'specialofferbox2_img', 'specialoffer_section' , 'Select Image');

$wp_customize->add_setting(
    'spbanner_image2',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);
$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'spbanner_image2',
        array(
            'section' => 'specialoffer_section',
            'settings' => 'spbanner_image2',
            'description' => __('Recommended Image Size: 650X357px', 'luzuk-premium')
        )
    )
);

$wp_customize->add_setting(
    'spoffersubtitle2a',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Discount', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffersubtitle2a',
    array(
        'settings'      => 'spoffersubtitle2a',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Sub Heading 1', 'luzuk-premium' )
    )
);


$wp_customize->add_setting(
    'spoffersubtitle2',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '30% oFF', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffersubtitle2',
    array(
        'settings'      => 'spoffersubtitle2',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Sub Heading 2', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'spoffertitle2',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Vintage Reserve', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spoffertitle2',
    array(
        'settings'      => 'spoffertitle2',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Heading', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'spofferbtntxt2',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Shop Now', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'spofferbtntxt2',
    array(
        'settings'      => 'spofferbtntxt2',
        'section'       => 'specialoffer_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);

$wp_customize->add_setting('spofferbtntxtlink2',   
    array('default'=> 'add link here', 
    'sanitize_callback' => 'esc_url_raw')
);
$wp_customize->add_control('spofferbtntxtlink2',
    array(
        'settings'      => 'spofferbtntxtlink2',
        'section'       => 'specialoffer_section',
        'type'          => 'url',
        'label'         => __( 'Add Button Link', 'luzuk-premium' )
    )
);
  
lzCustomLable($wp_customize, 'specialoffercolor', 'specialoffer_section', 'Special Offer Color Settings');

addColorPalatOption($wp_customize, 'membe_pagebgovlyClr', 'specialoffer_section', 'Image Overlay Color ', '#070707');

addColorPalatOption($wp_customize, 'membe_pagesubttl', 'specialoffer_section', 'Sub Heading Color ', '#fff');

addColorPalatOption($wp_customize, 'membe_pagettl', 'specialoffer_section', 'Heading Color ', '#fff');

addColorPalatOption($wp_customize, 'membe_btntxtclr', 'specialoffer_section', 'Button Text Color ', '#fff');

addColorPalatOption($wp_customize, 'membe_btntxthvclr', 'specialoffer_section', 'Button Text Hover Color ', '#fff');