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

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

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


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

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


   // Call Box color
    addColorPalatOption($wp_customize, 'lz_fitness_order_callboxColor', 'lz_fitness_premium_order_section', 'Call box color', '#ff6796');

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

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

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


$wp_customize->add_setting(
        'lz_fitness_order_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_order_label',
        array(
            'settings'      => 'lz_fitness_order_label',
            'section'       => 'lz_fitness_premium_order_section',
            'type'          => 'textarea',
            'label'         => __( 'Order Label', 'lz-fitness-premium' )
        )
    );


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

   // order title color
    addColorPalatOption($wp_customize, 'lz_fitness_order_titleColor', 'lz_fitness_premium_order_section', 'order title color', '#fff');

     // order text code color
    addColorPalatOption($wp_customize, 'lz_fitness_order_textcodeColor', 'lz_fitness_premium_order_section', 'order text code color', '#01beff');


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

  // order btn text color
    addColorPalatOption($wp_customize, 'lz_fitness_order_btntextColor', 'lz_fitness_premium_order_section', 'Order button text color', '#fff');

 // order btn bg color
    addColorPalatOption($wp_customize, 'lz_fitness_order_btnbgColor', 'lz_fitness_premium_order_section', 'Order button background color', '#01beff');

 // order btn text hover color
    addColorPalatOption($wp_customize, 'lz_fitness_order_btntexthoverColor', 'lz_fitness_premium_order_section', 'Order button text hover color', '#fff');

 // order btn bg hover color
    addColorPalatOption($wp_customize, 'lz_fitness_order_btnbghoverColor', 'lz_fitness_premium_order_section', 'Order button background hover color', '#ff6796');