<?php
/**
 * Createing an about us pannel for customizer
 */

// START OFFER SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_offer_section',
        array(
            'title' => __( 'Offer Section', 'lz-fitness-premium' ),
            'panel' => 'lz_fitness_premium_home_panel'
        )
    );
    // ENABLE/DISABLE OFFER SECTION
    $wp_customize->add_setting(
        'lz_fitness_offer_section_disable',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'lz_fitness_offer_section_disable',
            array(
                'settings'      => 'lz_fitness_offer_section_disable',
                'section'       => 'lz_fitness_premium_offer_section',
                'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lz-fitness-premium' ),
                    'off' => __( 'No', 'lz-fitness-premium' )
                ),
            )
        )
    );

    backgroundManager($wp_customize, 'offer', 'lz_fitness_premium_offer_section', $color='#fff', get_template_directory_uri().'/images/offer-bg.jpg', 'color');


lzCustomLable($wp_customize, 'lz_fitness_offer_boxdata', 'lz_fitness_premium_offer_section', 'Set Offer text & Colors:');
   
    $wp_customize->add_setting(
        'lz_fitness_offercalltext',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'CALL NOW', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_offercalltext',
        array(
            'settings'      => 'lz_fitness_offercalltext',
            'section'       => 'lz_fitness_premium_offer_section',
            'type'          => 'text',
            'label'         => __( 'Phone Text', 'lz-fitness-premium' )
        )
    );

    $wp_customize->add_setting(
        'lz_fitness_offercallnumber',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( '012 345 6789', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_offercallnumber',
        array(
            'settings'      => 'lz_fitness_offercallnumber',
            'section'       => 'lz_fitness_premium_offer_section',
            'type'          => 'text',
            'label'         => __( 'Phone Number', 'lz-fitness-premium' )
        )
    );


   // Call Box color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_callboxColor', 'lz_fitness_premium_offer_section', 'Call box color', '#ff6796');

 // Call Box curve color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_callboxcurveColor', 'lz_fitness_premium_offer_section', 'Call box curve color', '#d41d56');

     // Call Box text color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_callboxtextColor', 'lz_fitness_premium_offer_section', 'Call box text color', '#fff');

     // Call Box number color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_callboxnumberColor', 'lz_fitness_premium_offer_section', 'Call box number color', '#fff');


$wp_customize->add_setting(
        'lz_fitness_offer_label',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( '15% OFF YOUR PURCHASE OF 50$ OR MORE', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_offer_label',
        array(
            'settings'      => 'lz_fitness_offer_label',
            'section'       => 'lz_fitness_premium_offer_section',
            'type'          => 'textarea',
            'label'         => __( 'Offer Label', 'lz-fitness-premium' )
        )
    );


$wp_customize->add_setting(
        'lz_fitness_offer_code',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'USE CODE: SAVE15', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_offer_code',
        array(
            'settings'      => 'lz_fitness_offer_code',
            'section'       => 'lz_fitness_premium_offer_section',
            'type'          => 'text',
            'label'         => __( 'Offer Code', 'lz-fitness-premium' )
        )
    );

   // Offer title color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_titleColor', 'lz_fitness_premium_offer_section', 'Offer title color', '#fff');

     // Offer text code color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_textcodeColor', 'lz_fitness_premium_offer_section', 'Offer text code color', '#01beff');


lzCustomLable($wp_customize, 'lz_fitness_offer_lblbuttonabtdisplay', 'lz_fitness_premium_offer_section', 'Offer Button Display & Text Setting:');
// to show & hide another button
$wp_customize->add_setting( 'offer_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'offer_button_display', array( 'label' => 'Button Display', 'section' => 'lz_fitness_premium_offer_section', 'settings' => 'offer_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) ); 
// end to show & hide button
// appointment 
$wp_customize->add_setting(
    'lz_fitness_offer_offerbtntitle',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Save Today' )
    )
);
$wp_customize->add_control(
    'lz_fitness_offer_offerbtntitle',
    array(
        'settings'      => 'lz_fitness_offer_offerbtntitle',
        'section'       => 'lz_fitness_premium_offer_section',
        'type'          => 'text',
        'label'         => __( 'Offer Button Text', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting('lz_fitness_offer_offerbtnlink',   array('default'=> 'add link here', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('lz_fitness_offer_offerbtnlink',
    array(
        'settings'      => 'lz_fitness_offer_offerbtnlink',
        'section'       => 'lz_fitness_premium_offer_section',
        'type'          => 'url',
        'label'         => __( 'Add "Offer Button" link here', 'lz-fitness-premium' )
    )
);

  // Offer btn text color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_btntextColor', 'lz_fitness_premium_offer_section', 'Offer button text color', '#fff');

 // Offer btn bg color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_btnbgColor', 'lz_fitness_premium_offer_section', 'Offer button background color', '#01beff');

 // Offer btn text hover color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_btntexthoverColor', 'lz_fitness_premium_offer_section', 'Offer button text hover color', '#fff');

 // Offer btn bg hover color
    addColorPalatOption($wp_customize, 'lz_fitness_offer_btnbghoverColor', 'lz_fitness_premium_offer_section', 'Offer button background hover color', '#ff6796');

    // END OFFER SECTION 