<?php  
/**
 * Createing an services pannel for customizer
 *
 */
// service SECTION START HERE 
/*============service SECTION PANEL============*/
$wp_customize->add_section(
    'luzuk_them_ct_service_section',
    array(
        'title'         => __( 'Our Rooms Section', 'Luzuk' ),
        'panel'   => 'luzuk_them_premium_home_panel',
    )
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
    'luzuk_them_ct_service_section_disable',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_them_Switch_Control(
        $wp_customize,
        'luzuk_them_ct_service_section_disable',
        array(
            'settings'      => 'luzuk_them_ct_service_section_disable',
            'section'       => 'luzuk_them_ct_service_section',
            'label'         => __( 'Disable Section', 'Luzuk' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk' ),
                'off' => __( 'No', 'Luzuk' )
            )   
        )
    )
);


//backgroundManager($wp_customize, 'service', 'luzuk_them_ct_service_section', $color='#ffffff', get_template_directory_uri().'/images/ourroombg.jpg', 'color');

backgroundManager($wp_customize, 'service', 'luzuk_them_ct_service_section', $color='#f7f7f7', get_template_directory_uri().'/images/default-gray.png', 'img');

addColorPalatOption($wp_customize, 'lz_services_secbottomColor', 'luzuk_them_ct_service_section', 'Select Section Bottom Background color', '#332931');

//button
lzCustomLable($wp_customize, 'luzuk_them_services_lblbutton1display', 'luzuk_them_ct_service_section', 'Section Bottom Background Color Display Setting:');
// to show & hide another button
$wp_customize->add_setting( 'servicesbottomcolor_button_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'servicesbottomcolor_button_display', array( 'label' => 'Display Bottom Background', 'section' => 'luzuk_them_ct_service_section', 'settings' => 'servicesbottomcolor_button_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) ); 
// end to show & hide button



lzCustomLable($wp_customize, 'luzuk_them_sec_servicessectionpadding', 'luzuk_them_ct_service_section', 'Set Padding For Section:');

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

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






$wp_customize->add_setting(
    'luzuk_them_ct_service_title_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
    )
);

$wp_customize->add_control(
    new luzuk_them_Customize_Heading(
        $wp_customize,
        'luzuk_them_ct_service_title_subtitle_heading',
        array(
            'settings'      => 'luzuk_them_ct_service_title_subtitle_heading',
            'section'       => 'luzuk_them_ct_service_section',
            'label'         => __( 'Section Title ', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting(
    'luzuk_them_ct_service_text',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( 'Our Rooms', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'luzuk_them_ct_service_text',
    array(
        'settings'      => 'luzuk_them_ct_service_text',
        'section'       => 'luzuk_them_ct_service_section', 
        'type'          => 'text',
        'label'         => __( 'Section Title', 'Luzuk' )
    )
);



addColorPalatOption($wp_customize, 'lz_services_HeadingColor', 'luzuk_them_ct_service_section', 'Select Section Title color', '#101010');

addColorPalatOption($wp_customize, 'lz_services_HeadingborColor', 'luzuk_them_ct_service_section', 'Select Section Title Border color', '#fb6f58');


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


/*2nd for note text*/
$wp_customize->add_setting('lz_CT_service_img_lbl', array('sanitize_callback'=>'luzuk_them_sanitize_text'));
$wp_customize->add_control(
    new luzuk_them_Info_Text( 
        $wp_customize,
        'lz_CT_service_img_lbl',
        array(
            'settings'      => 'lz_CT_service_img_lbl',
            'section'       => 'luzuk_them_ct_service_section',
            'label'         => __( 'Note:', 'Luzuk' ),    
            'description'   => __( 'Set Images of equal height of size atleast 310px to show images in proper way', 'Luzuk' ),
        )
    )
);
/*for note text*/



$wp_customize->add_setting('luzuk_them_ct_service_npp_heading',array('sanitize_callback' => 'luzuk_them_sanitize_text'));
$wp_customize->add_control(
    new luzuk_them_Customize_Heading(
        $wp_customize,
        'luzuk_them_ct_service_npp_heading',
        array(
            'settings'      => 'luzuk_them_ct_service_npp_heading',
            'section'       => 'luzuk_them_ct_service_section',
            'label'         => __( 'Set Number Of Rooms to show', 'Luzuk' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_them_ct_rooms_npp_count',array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => 3));
$wp_customize->add_control(
    'luzuk_them_ct_rooms_npp_count',
    array(
        'settings'      => 'luzuk_them_ct_rooms_npp_count',
        'section'       => 'luzuk_them_ct_service_section',
        'type'          => 'select',
        'label'         => __( 'Number of Room to show', 'Luzuk' ),
        '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(
        'luzuk_them_ct_service_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_them_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_them_Customize_Heading(
            $wp_customize,
            'luzuk_them_ct_service_heading'.$i,
            array(
                'settings'      => 'luzuk_them_ct_service_heading'.$i,
                'section'       => 'luzuk_them_ct_service_section',
                'label'         => __( 'Services', 'Luzuk' ).$i,
            )
        )
    );
    if(is_array($lzFitnessserviceSingleChoice)){
        $wp_customize->add_setting(
            'luzuk_them_ct_service_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'luzuk_them_ct_service_page'.$i,
            array(
                'settings'      => 'luzuk_them_ct_service_page'.$i,
                'section'       => 'luzuk_them_ct_service_section',
                'type'=> 'select',
                'label'         => __( 'Select a service', 'Luzuk' ),
                'choices' => $lzFitnessserviceSingleChoice,
            )
        );


    }else{
        $wp_customize->add_setting('luzuk_them_ct_service_section_lbl'.$i, array('sanitize_callback'=>'luzuk_them_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_them_Info_Text( 
                $wp_customize,
                'luzuk_them_ct_service_section_lbl'.$i,
                array(
                    'settings'      => 'luzuk_them_ct_service_section_lbl'.$i,
                    'section'       => 'luzuk_them_ct_service_section',
                    'label'         => __( 'Note:', 'Luzuk' ),  
                    '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.', 'Luzuk' ),
                )
            )
        );
    }

}

lzCustomLable($wp_customize, 'homepageservices_button_displaysets', 'luzuk_them_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' => 'luzuk_them_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(
    'luzuk_them_homepageservices_txt',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( 'READ MORE', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'luzuk_them_homepageservices_txt',
    array(
        'settings'      => 'luzuk_them_homepageservices_txt',
        'section'       => 'luzuk_them_ct_service_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);
addColorPalatOption($wp_customize, 'lz_services_ServicePtitleColor', 'luzuk_them_ct_service_section', 'Select Service Page Title color', '#101010');

addColorPalatOption($wp_customize, 'lz_services_ServicePtitlebgColor', 'luzuk_them_ct_service_section', 'Select Service Page Title Background color', '#ffffff');


addColorPalatOption($wp_customize, 'lz_services_ServiceButtonTextColor', 'luzuk_them_ct_service_section', 'Select Button Text color', '#ffffff');

addColorPalatOption($wp_customize, 'lz_services_ServiceButtonTextHoverColor', 'luzuk_them_ct_service_section', 'Select Button Text Hover color', '#fb6f58');

addColorPalatOption($wp_customize, 'lz_services_ServiceimgborHoverColor', 'luzuk_them_ct_service_section', 'Select Service Page Image Hover Border color', '#fb6f58');

