<?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'         => __( 'Services Section', 'Hexagon' ),
        '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', 'Hexagon' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Hexagon' ),
                'off' => __( 'No', 'Hexagon' )
            )   
        )
    )
);
backgroundManager($wp_customize, 'ctservice', 'lz_fitness_ct_service_section', $color='#f5f5f5');

// to show & hide another button
$wp_customize->add_setting( 'servicesmainsecanimation_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'servicesmainsecanimation_button_display', array( 'label' => 'Animation Display Setting', 'section' => 'lz_fitness_ct_service_section', 'settings' => 'servicesmainsecanimation_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Start animation', 'hide' => 'Stop Animation', ), ) ); 
// end to show & hide button

addColorPalatOption($wp_customize, 'lz_fitness_servicesan_animationboxColor', 'lz_fitness_ct_service_section', 'Select animated box color','#e7ccf7');



$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', 'Hexagon' ),
        )
    )
);

$wp_customize->add_setting(
    'lz_fitness_ct_service_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Our Services', 'Hexagon' )
    )
);
$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', 'Hexagon' )
    )
);


addColorPalatOption($wp_customize, 'lz_servicessection_HeadingColor', 'lz_fitness_ct_service_section', 'Select Section Title color', '#313131');

// $wp_customize->add_setting(
//     'lz_fitness_ct_service_subtitle',
//     array(
//         'sanitize_callback' => 'lz_fitness_sanitize_text',
//         'default'           => __( 'Pisum dolor sit amet, consectetur adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula. Sed at blandit ante. Vivamus feugiat.', 'Hexagon' )
//     )
// );
// $wp_customize->add_control(
//     'lz_fitness_ct_service_subtitle',
//     array(
//         'settings'      => 'lz_fitness_ct_service_subtitle',
//         'section'       => 'lz_fitness_ct_service_section', 
//         'type'          => 'textarea',
//         'label'         => __( 'Section Sub Title', 'Hexagon' )
//     )
// );


// addColorPalatOption($wp_customize, 'lz_servicessection_SubHeadingColor', 'lz_fitness_ct_service_section', 'Select Section Sub Title color', '#6d6c6c');

/*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:', 'Hexagon' ),    
            'description'   => __( 'Just place the shortcode "[SERVICES]" in your page to Show all services in a page', 'Hexagon' ),
        )
    )
);
/*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 service to show', 'Hexagon' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_ct_service_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 7));
$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', 'Hexagon' ),
        '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'         => __( 'Our Service', 'Hexagon' ).$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', 'Hexagon' ),
                'choices' => $lzFitnessserviceSingleChoice,
            )
        );
$wp_customize->add_setting(
        'lz_fitness_ct_service_icon1'.$i,
        array(
            'default'           => 'fa fa-slideshare',
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new lz_fitness_Fontawesome_Icon_Chooser(
            $wp_customize,
            'lz_fitness_ct_service_icon1'.$i,
            array(
                'settings'      => 'lz_fitness_ct_service_icon1'.$i,
                'section'       => 'lz_fitness_ct_service_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'lz-fitness-premium' ),
            )
        )
    );  


    }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:', 'Hexagon' ),  
                    'description'   => __( '<strong>Changes will not reflect unless you select the service.</strong> <br/>Please add the service from "services menu" and then select service to show.', 'Hexagon' ),
                )
            )
        );
    }

}

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

$wp_customize->add_setting(
    'lz_fitness_Servicessection_txt',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'read more' )
    )
);
$wp_customize->add_control(
    'lz_fitness_Servicessection_txt',
    array(
        'settings'      => 'lz_fitness_Servicessection_txt',
        'section'       => 'lz_fitness_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Add Button Text Here:', 'luzuk' )
    )
);



addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxBackgroundColor', 'lz_fitness_ct_service_section', 'Select Service Box Background color', '#fff');
//addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxBackgroundHoverColor', 'lz_fitness_ct_service_section', 'Select Service Box Background Hover color', '#6843c4');
 

 // for gradiant

$wp_customize->add_setting(
    'lz_fitness_servicebox_bg_color_one', array(
        'default'           => '#5127c3',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'lz_fitness_servicebox_bg_color_one',array(
            'settings'      => 'lz_fitness_servicebox_bg_color_one',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Service Box Background Hover Gradient Color One ', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'lz_fitness_servicebox_bg_color_two', array(
        'default'           => '#c166ef',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'lz_fitness_servicebox_bg_color_two',array(
            'settings'      => 'lz_fitness_servicebox_bg_color_two',
            'section'       => 'lz_fitness_ct_service_section',
            'label'         => __( 'Service Box Background Hover Gradient Color Two ', 'Luzuk Premium' ),
        )
    )
); 

addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxIconColor', 'lz_fitness_ct_service_section', 'Select Icon color', '#6843c4');
addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxIconHoverColor', 'lz_fitness_ct_service_section', 'Select Icon Hover color', '#fff');

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


addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxDescriptionColor', 'lz_fitness_ct_service_section', 'Select Service Page Description color', '#6d6c6c');
addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxDescriptionhoverColor', 'lz_fitness_ct_service_section', 'Select Service Page Description Hover color', '#fff');

addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxButtonTextColor', 'lz_fitness_ct_service_section', 'Select Service Box Button Text color', '#6843c4');
addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxButtonTextHoverColor', 'lz_fitness_ct_service_section', 'Select Service Box Button Text Hover color', '#fff');

addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxButtonTextBorderColor', 'lz_fitness_ct_service_section', 'Select Service Box Button Border color', '#6843c4');
addColorPalatOption($wp_customize, 'lz_servicessection_ServiceBoxButtonTextBorderHoverColor', 'lz_fitness_ct_service_section', 'Select Service Box Button Border Hover color', '#fff');
