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

$wp_customize->add_setting(
    'services_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'services_title_subtitle_heading',
        array(
            'settings'      => 'services_title_subtitle_heading',
            'section'       => 'services_section',
            'label'         => __( 'Section Title & Sub Title', 'gurukul' ),
        )
    )
);
$wp_customize->add_setting(
    'services_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Our Services', 'gurukul' )
    )
);
$wp_customize->add_control(
    'services_title',
    array(
        'settings'      => 'services_title',
        'section'       => 'services_section', 
        'type'          => 'text',
        'label'         => __( 'Title for section', 'gurukul' )
    )
);

$wp_customize->add_setting(
    'services_sub_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Lorem Ipsum availables, but majority have suffered', 'gurukul' )
    )
);
$wp_customize->add_control(
    'services_sub_title',
    array(
        'settings'      => 'services_sub_title',
        'section'       => 'services_section',
        'type'          => 'textarea',
        'label'         => __( 'Sub Title', 'gurukul' )
    )
);
addColorPalatOption($wp_customize, 'lz_services_HeadingColor', 'services_section', 'Section Title Color ', '#292929');
addColorPalatOption($wp_customize, 'lz_services_SubHeadingColor', 'services_section', 'Sub Title Color ', '#292929');
addColorPalatOption($wp_customize, 'lz_services_borderbotmColor', 'services_section', 'Border Color ', '#cecece');
addColorPalatOption($wp_customize, 'lz_services_borderbotmheighligjhtColor', 'services_section', 'Heighlight Border Color ', '#fbda4d');


$wp_customize->add_setting('services_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'services_npp_heading',
        array(
            'settings'      => 'services_npp_heading',
            'section'       => 'services_section',
            'label'         => __( 'Number Of Services to show', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting('services_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 7));
$wp_customize->add_control(
    'services_npp_count',
    array(
        'settings'      => 'services_npp_count',
        'section'       => 'services_section',
        'type'          => 'select',
        'label'         => __( 'Number of services to show', 'gurukul' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
    )
);

// $wp_customize->add_setting(
//         'project_page',
//         array(
//             'sanitize_callback'=> 'absint',
//             'default' => __('Project Readmore Link', 'gurukul')
//         )
//     );
//     $wp_customize->add_control(
//         'project_page',
//         array(
//             'settings'=> 'project_page',
//             'section' => 'services_section',
//             'type'=>'select',
//             'label'=>__('Link to Project page', 'gurukul'),
//             'choices'=>$lz_fitness_page_choice
//         )
//     );

// PROJECT PAGES
for( $i = 1; $i <= 16; $i++ ){
    $wp_customize->add_setting(
        'services_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'services_heading'.$i,
            array(
                'settings'      => 'services_heading'.$i,
                'section'       => 'services_section',
                'label'         => __( 'Service Page', 'gurukul' ).$i,
            )
        )
    );
    if(is_array($lzFitnessfeaturesSingleChoice)){
        $wp_customize->add_setting(
            'services_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'services_page'.$i,
            array(
                'settings'      => 'services_page'.$i,
                'section'       => 'services_section',
                'type'=> 'select',
                'label'         => __( 'Select a Service Page', 'gurukul' ),
                'choices' => $lzFitnessfeaturesSingleChoice,
            )
        );
    }else{
        $wp_customize->add_setting('services_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Info_Text( 
                $wp_customize,
                'services_section_lbl'.$i,
                array(
                    'settings'      => 'services_section_lbl'.$i,
                    'section'       => 'services_section',
                    'label'         => __( 'Note:', 'gurukul' ),    
                    'description'   => __( '<strong>Changes will not reflect unless you select the Service Page.</strong> <br/>Please add the Services from "Services menu" and then select Services member to show information.', 'gurukul' ),
                )
            )
        );
    }
    // Title color

 // $wp_customize->add_setting(
 //        'project_page',
 //        array(
 //            'sanitize_callback'=> 'absint',
 //            'default' => __('Project Readmore Link', 'gurukul')
 //        )
 //    );
 //    $wp_customize->add_control(
 //        'project_page',
 //        array(
 //            'settings'=> 'project_page',
 //            'section' => 'services_section',
 //            'type'=>'select',
 //            'label'=>__('Link to Project page', 'gurukul'),
 //            'choices'=>$lz_fitness_page_choice
 //        )
 //    );
}

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


$wp_customize->add_setting(
    'homepageservices_buttxt',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Read More', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'homepageservices_buttxt',
    array(
        'settings'      => 'homepageservices_buttxt',
        'section'       => 'services_section',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);



addColorPalatOption($wp_customize, 'lz_services_pageTitleColor', 'services_section', 'Service Page Title Color ', '#222222');

addColorPalatOption($wp_customize, 'lz_services_pageDescriptionColor', 'services_section', 'Service Page Description Color ', '#222222');

addColorPalatOption($wp_customize, 'lz_services_pageButtontextColor', 'services_section', 'Button Text Color ', '#ffffff');
addColorPalatOption($wp_customize, 'lz_services_pageButtonarrowColor', 'services_section', 'Button Arrow Color ', '#ffffff');
addColorPalatOption($wp_customize, 'lz_services_pageButtonbgssColor', 'services_section', 'Button Background Color ', '#283949');

addColorPalatOption($wp_customize, 'lz_services_pageButtontexthoverColor', 'services_section', 'Button Text Hover Color ', '#2b2b2b');
addColorPalatOption($wp_customize, 'lz_services_pageButtonarrowhoverColor', 'services_section', 'Button Arrow Hover Color ', '#2b2b2b');
addColorPalatOption($wp_customize, 'lz_services_pageButtonbgsshoverColor', 'services_section', 'Button Background Hover Color ', '#fbda4d');

//addColorPalatOption($wp_customize, 'lz_services_boxbgssColor', 'services_section', 'Service Box Background Color ', '#ffffff');

addColorPalatOption($wp_customize, 'lz_services_pageimageoverlaybgssclrColor', 'services_section', 'Image Overlay Color ', '#000');

