<?php  
/**
 * Createing an about us pannel for customizer
 *
 */
// service SECTION START HERE 
/*============service SECTION PANEL============*/
$wp_customize->add_section(
    'lz_fitness_ct_service_section',
    array(
        'title'         => __( 'Our Services Section', 'InsideTours' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
    'lz_fitness_ct_service_section_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'lz_fitness_ct_service_section_disable',
        array(
            'settings'      => 'lz_fitness_ct_service_section_disable',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Disable Section', 'InsideTours' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'InsideTours' ),
                'off' => __( 'No', 'InsideTours' )
            )   
        )
    )
);
backgroundManager($wp_customize, 'service', 'lz_fitness_ct_service_section', $color='#f2f1f0');


lzCustomLable($wp_customize, 'lz_fitness_sec_servicessectionpadding', 'lz_fitness_ct_service_section', 'Set Padding For Services Section:');

$wp_customize->add_setting(
    'sec_servicessectionTpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '9em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_servicessectionTpadding',
    array(
        'settings'      => 'sec_servicessectionTpadding',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Services Section Top Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_servicessectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '9em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_servicessectionBpadding',
    array(
        'settings'      => 'sec_servicessectionBpadding',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Services Section Bottom Padding', 'lz-fitness-premium' )
    )
);

$wp_customize->add_setting(
    'sec_servicessectionLpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_servicessectionLpadding',
    array(
        'settings'      => 'sec_servicessectionLpadding',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Services Section Left Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_servicessectionRpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_servicessectionRpadding',
    array(
        'settings'      => 'sec_servicessectionRpadding',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Services Section Right Padding', 'lz-fitness-premium' )
    )
);


lzCustomLable($wp_customize, 'lz_fitness_centerimageservicesbx', 'lz_fitness_ct_service_section', 'Background Image Dispaly For Section Title & Sub Title Box:');

// to show & hide another button
$wp_customize->add_setting( 'servicestitlebgimage_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'servicestitlebgimage_display', array( 'label' => 'Background Image Display', 'section' => 'lz_fitness_ct_service_section', 'settings' => 'servicestitlebgimage_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Background Image', 'hide' => 'Hide Background Image', ), ) ); 


$wp_customize->add_setting('lz_fitness_premium_Servicescenterimage_section_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Info_Text( 
        $wp_customize,
        'lz_fitness_premium_Servicescenterimage_section_lbl',
        array(
            'settings'      => 'lz_fitness_premium_Servicescenterimage_section_lbl',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Note:', 'InsideTours' ),    
            'description'   => __( '*Required Background Image Of Size 200*180 pixels(set png image to show background image in proper way)', 'InsideTours' ),
        )
    )
);
$wp_customize->add_setting(
        'lz_fitness_servicesttl_image_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_servicesttl_image_heading',
            array(
                'settings'      => 'lz_fitness_servicesttl_image_heading',
                'section'       => 'lz_fitness_ct_service_section',
                'label'         => __( 'Set Title & Subtitle Box Background Image & Its Position From Top', 'lz-fitness-premium' ),
            )
        )
    );
    $wp_customize->add_setting(
        'lz_fitness_servicesttl_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'lz_fitness_servicesttl_image',
            array(
                'section' => 'lz_fitness_ct_service_section',
                'settings' => 'lz_fitness_servicesttl_image',
                'description' => __('Recommended Image Size: 200X180px', 'lz-fitness-premium')
            )
        )
    );
// end to show & hide button
//lzCustomLable($wp_customize, 'lz_fitness_centerimageservicespositionbx', 'lz_fitness_ct_service_section', 'Set Background Image Position From Top:');

$wp_customize->add_setting(
    'sec_servicetitleimage',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '107px', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_servicetitleimage',
    array(
        'settings'      => 'sec_servicetitleimage',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Set Title & Subtitle Box Background Image Position From Top', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'lz_fitness_ct_service_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_ct_service_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_ct_service_title_subtitle_heading',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Section Title & Sub Title', 'InsideTours' ),
        )
    )
);

$wp_customize->add_setting(
    'lz_fitness_ct_service_text',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Our Services', 'InsideTours' )
    )
);
$wp_customize->add_control(
    'lz_fitness_ct_service_text',
    array(
        'settings'      => 'lz_fitness_ct_service_text',
        'section'       => 'lz_fitness_ct_service_section', 
        'type'          => 'text',
        'label'         => __( 'Section Sub Title', 'InsideTours' )
    )
);
addColorPalatOption($wp_customize, 'lz_services_SectionSubttlColor', 'lz_fitness_ct_service_section', 'Select Section Sub Title color', '#68a0f9');
addColorPalatOption($wp_customize, 'lz_services_SectionSubttlborderColor', 'lz_fitness_ct_service_section', 'Select Section Sub Title Border color', '#68a0f9');

$wp_customize->add_setting(
    'lz_fitness_ct_service_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'What We Do', 'InsideTours' )
    )
);
$wp_customize->add_control(
    'lz_fitness_ct_service_title',
    array(
        'settings'      => 'lz_fitness_ct_service_title',
        'section'       => 'lz_fitness_ct_service_section', 
        'type'          => 'text',
        'label'         => __( 'Section Title', 'InsideTours' )
    )
);

addColorPalatOption($wp_customize, 'lz_services_HeadingColor', 'lz_fitness_ct_service_section', 'Select Section Title color', '#3b3634');


/*for note text*/
$wp_customize->add_setting('lz_CT_service_sectionnoteser_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Info_Text( 
        $wp_customize,
        'lz_CT_service_sectionnoteser_lbl',
        array(
            'settings'      => 'lz_CT_service_sectionnoteser_lbl',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Note:', 'InsideTours' ),    
            'description'   => __( 'Just place the shortcode "[SERVICES]" in your page to Show all services in a page', 'InsideTours' ),
        )
    )
);
/*for note text*/


$wp_customize->add_setting('lz_fitness_ct_service_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_ct_service_npp_heading',
        array(
            'settings'      => 'lz_fitness_ct_service_npp_heading',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Set Number Of services to show', 'InsideTours' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_ct_service_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 8));
$wp_customize->add_control(
    'lz_fitness_ct_service_npp_count',
    array(
        'settings'      => 'lz_fitness_ct_service_npp_count',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'select',
        'label'         => __( 'Number of services to show', 'InsideTours' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

// service PAGES
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_ct_service_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_ct_service_heading'.$i,
            array(
                'settings'      => 'lz_fitness_ct_service_heading'.$i,
                'section'       => 'lz_fitness_ct_service_section',
                'label'         => __( 'Services', 'InsideTours' ).$i,
            )
        )
    );
    if(is_array($lzFitnessserviceSingleChoice)){
        $wp_customize->add_setting(
            'lz_fitness_ct_service_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'lz_fitness_ct_service_page'.$i,
            array(
                'settings'      => 'lz_fitness_ct_service_page'.$i,
                'section'       => 'lz_fitness_ct_service_section',
                'type'=> 'select',
                'label'         => __( 'Select a service', 'InsideTours' ),
                'choices' => $lzFitnessserviceSingleChoice,
            )
        );


    }else{
        $wp_customize->add_setting('lz_fitness_ct_service_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Info_Text( 
                $wp_customize,
                'lz_fitness_ct_service_section_lbl'.$i,
                array(
                    'settings'      => 'lz_fitness_ct_service_section_lbl'.$i,
                    'section'       => 'lz_fitness_ct_service_section',
                    'label'         => __( 'Note:', 'InsideTours' ),  
                    'description'   => __( '<strong>Changes will not reflect unless you select the services.</strong> <br/>Please add the services from "services menu" and then select services to show.', 'InsideTours' ),
                )
            )
        );
    }

}

lzCustomLable($wp_customize, 'homepageservices_button_displaysets', 'lz_fitness_ct_service_section', 'Services Button Display, Button Text:');

// to show & hide another button
$wp_customize->add_setting( 'homepageservices_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'homepageservices_button_display', array( 'label' => 'Button Display', 'section' => 'lz_fitness_ct_service_section', 'settings' => 'homepageservices_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) ); 
// end to show & hide button


$wp_customize->add_setting(
    'lz_fitness_homepageservices_txt',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'READ MORE', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_homepageservices_txt',
    array(
        'settings'      => 'lz_fitness_homepageservices_txt',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);
addColorPalatOption($wp_customize, 'lz_services_ServicePtitleColor', 'lz_fitness_ct_service_section', 'Select Service Page Title color', '#1a1819');

addColorPalatOption($wp_customize, 'lz_services_ServicePSubtitleColor', 'lz_fitness_ct_service_section', 'Select Service Page Text color', '#7e7c7a');

addColorPalatOption($wp_customize, 'lz_services_ServiceBoxBackgroundColor', 'lz_fitness_ct_service_section', 'Select Service Box Background color', '#ffffff');

addColorPalatOption($wp_customize, 'lz_services_ServicePtitlehoverColor', 'lz_fitness_ct_service_section', 'Select Service Page Title Hover color', '#fff');

addColorPalatOption($wp_customize, 'lz_services_ServicePSubtitlehoverColor', 'lz_fitness_ct_service_section', 'Select Service Page Text Hover color', '#fff');

addColorPalatOption($wp_customize, 'lz_services_ServiceBoxBackgroundhoverColor', 'lz_fitness_ct_service_section', 'Select Service Box Background Hover color', '#ff7c4e');

addColorPalatOption($wp_customize, 'lz_services_ServiceBoxBorderColor', 'lz_fitness_ct_service_section', 'Select Service Box Hover Border color', '#000');

addColorPalatOption($wp_customize, 'lz_services_ServiceButtonTextColor', 'lz_fitness_ct_service_section', 'Select Button Text color', '#ff7c4e');

addColorPalatOption($wp_customize, 'lz_services_ServiceButtonTextHoverColor', 'lz_fitness_ct_service_section', 'Select Button Text Hover color', '#ffffff');

addColorPalatOption($wp_customize, 'lz_services_ServiceButtonBackgroundColor', 'lz_fitness_ct_service_section', 'Select Button Background color', '#f2f1f0');

addColorPalatOption($wp_customize, 'lz_services_ServiceButtonBackgroundHvrColor', 'lz_fitness_ct_service_section', 'Select Button Background Hover color', '#ff7c4e');
addColorPalatOption($wp_customize, 'lz_services_ServiceIndicatorsColor', 'lz_fitness_ct_service_section', 'Select Service Slider Indicators color', '#f6cbbc');
addColorPalatOption($wp_customize, 'lz_services_ServiceAcctiveIndicatorsColor', 'lz_fitness_ct_service_section', 'Select Service Slider Hover & Active Indicator color', '#ff7c4e');
