<?php 
$wp_customize->add_section(
    'service_area',
    array(
        'title'         => __( 'Our Services Section', 'Luzuk' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
$wp_customize->add_setting(
    'service_area_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'service_area_disable',
        array(
            'settings'      => 'service_area_disable',
            'section'       => 'service_area',
            'label'         => __( 'Disable Section', 'Luzuk' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'Luzuk' ),
                'off' => __( 'No', 'Luzuk' )
            )   
        )
    )
); 
lzCustomLable($wp_customize, 'luzuk_sec_servicessectionpadding', 'service_area', 'Set Section Padding:');

$wp_customize->add_setting(
    'service_areaTpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '8em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'service_areaTpadding',
    array(
        'settings'      => 'service_areaTpadding',
        'section'       => 'service_area',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'service_areaBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '5em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'service_areaBpadding',
    array(
        'settings'      => 'service_areaBpadding',
        'section'       => 'service_area',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'luzuk-premium' )
    )
);

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

//lzCustomLable($wp_customize, 'homepageservices_animation', 'service_area', 'Animation Display:');

// to show & hide another button
//$wp_customize->add_setting( 'services_animation_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'services_animation_display', array( 'label' => 'Animation Display', 'section' => 'service_area', 'settings' => 'services_animation_display', 'type' => 'radio', 'choices' => array( 'show' => 'Enable Animation', 'hide' => 'Disable Animation', ), ) ); 
// end to show & hide button


$wp_customize->add_setting(
    'services_maintitle_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'services_maintitle_subtitle_heading',
        array(
            'settings'      => 'services_maintitle_subtitle_heading',
            'section'       => 'service_area',
            'label'         => __( 'Section Title & Sub Title', 'Luzuk' ),
        )
    )
);
$wp_customize->add_setting(
    'service_area_subtitle',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'HEADING HERE', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'service_area_subtitle',
    array(
        'settings'      => 'service_area_subtitle',
        'section'       => 'service_area', 
        'type'          => 'text',
        'label'         => __( 'Section Sub Title', 'Luzuk' )
    )
);


addColorPalatOption($wp_customize, 'Services_SubTitleColor', 'service_area', 'Section Sub Title Color', '#50b2ef');


$wp_customize->add_setting(
    'service_area_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Our <span>Services</span>', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'service_area_title',
    array(
        'settings'      => 'service_area_title',
        'section'       => 'service_area', 
        'type'          => 'text',
        'label'         => __( 'Section Title', 'Luzuk' )
    )
);
addColorPalatOption($wp_customize, 'Services_TitleColor', 'service_area', 'Section Title Color', '#212121');

addColorPalatOption($wp_customize, 'Services_TitleBorderColor', 'service_area', 'Section Title Border Color', '#50b2ef');


$wp_customize->add_setting(
    'service_area_content',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula..', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'service_area_content',
    array(
        'settings'      => 'service_area_content',
        'section'       => 'service_area', 
        'type'          => 'textarea',
        'label'         => __( 'Section Content', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'Services_ContentColor', 'service_area', 'Section Content Color', '#3e3e3e');


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

$rgServiceSingleChoice[] = 'Select';

$wp_customize->add_setting('rg_service_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 3));
$wp_customize->add_control(
    'rg_service_npp_count',
    array(
        'settings'      => 'rg_service_npp_count',
        'section'       => 'service_area',
        'type'          => 'select',
        'label'         => __( 'Services to Show:', 'Luzuk' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

for( $i = 1; $i <= 12; $i++ ){

    $wp_customize->add_setting(
        'rg_service_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'rg_service_heading'.$i,
            array(
                'settings'      => 'rg_service_heading'.$i,
                'section'       => 'service_area',
                'label'         => __( 'Service', 'Luzuk' ).$i,
            )
        )
    ); 
    if(is_array($rgServiceSingleChoice)){
        $wp_customize->add_setting(
            'rg_service_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'rg_service_page'.$i,
            array(
                'settings'      => 'rg_service_page'.$i,
                'section'       => 'service_area',
                'type'=> 'select',
                'label'         => __( 'Select Service', 'Luzuk' ),
                'choices' => $rgServiceSingleChoice,
            )
        );
    }else{
        $wp_customize->add_setting('rg_service_area_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
        $wp_customize->add_control(
            new lz_fitness_Info_Text( 
                $wp_customize,
                'rg_service_area_lbl'.$i,
                array(
                    'settings'      => 'rg_service_area_lbl'.$i,
                    'section'       => 'service_area',
                    'label'         => __( 'Note:', 'Luzuk' ),  
                    'description'   => __( '<strong>Changes will not reflect unless you select the Servicess</strong> <br/>Please add the Services from "Servicess menu" and then select servicess to show information.', 'Luzuk' ),
                )
            )
        );
    }
    }




addColorPalatOption($wp_customize, 'Services_PageTitleColor', 'service_area', 'Services Page Title Color', '#ffffff');

addColorPalatOption($wp_customize, 'Services_PageHoverTextColor', 'service_area', 'Services Hover Text Color', '#ffffff');

$wp_customize->add_setting(
    'Services_PageImageOverlay_color_one', array(
        'default'           => '#7877ef87',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Services_PageImageOverlay_color_one',array(
            'settings'      => 'Services_PageImageOverlay_color_one',
            'section'       => 'service_area',
            'label'         => __( 'Services Image Overlay Background Color', 'Luzuk Premium' ),
        )
    )
);
$wp_customize->add_setting(
    'Services_PageImageHoverOverlay_color_one', array(
        'default'           => '#50b2f3',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Services_PageImageHoverOverlay_color_one',array(
            'settings'      => 'Services_PageImageHoverOverlay_color_one',
            'section'       => 'service_area',
            'label'         => __( 'Services Image Hover Overlay Background Color One', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'Services_PageImageHoverOverlay_color_two', array(
        'default'           => '#7989f8',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'Services_PageImageHoverOverlay_color_two',array(
            'settings'      => 'Services_PageImageHoverOverlay_color_two',
            'section'       => 'service_area',
            'label'         => __( 'Services Image Hover Overlay Background Color Two', 'Luzuk Premium' ),
        )
    )
);


lzCustomLable($wp_customize, 'homepageservices_button_displaysets', 'service_area', 'Services Button Display & Button Text Settings:');

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


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


addColorPalatOption($wp_customize, 'Services_ButtonTextArrowColor', 'service_area', 'Button Text & Arrow Color', '#212121');
addColorPalatOption($wp_customize, 'Services_ButtonTextArrowHoverColor', 'service_area', 'Button Text & Arrow Hover Color', '#ffffff');


$wp_customize->add_setting(
    'ServicesButtonbgs_color_one', array(
        'default'           => '#ffffff',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'ServicesButtonbgs_color_one',array(
            'settings'      => 'ServicesButtonbgs_color_one',
            'section'       => 'service_area',
            'label'         => __( 'Button Background Color One', 'Luzuk Premium' ),
        )
    )
);

$wp_customize->add_setting(
    'ServicesButtonbgs_color_two', array(
        'default'           => '#ffffff',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'ServicesButtonbgs_color_two',array(
            'settings'      => 'ServicesButtonbgs_color_two',
            'section'       => 'service_area',
            'label'         => __( 'Button Background Color Two', 'Luzuk Premium' ),
        )
    )
);
$wp_customize->add_setting(
    'ServicesButtonbgs_color_three', array(
        'default'           => '#293263',
        'sanitize_callback' => 'sanitize_hex_color',
    )
);
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize,'ServicesButtonbgs_color_three',array(
            'settings'      => 'ServicesButtonbgs_color_three',
            'section'       => 'service_area',
            'label'         => __( 'Button Hover Background Color', 'Luzuk Premium' ),
        )
    )
);



lzCustomLable($wp_customize, 'luzuk_sec_servicesimgheight', 'service_area', 'Set Services Image Height (Use services image of height that you have been set...otherwise it look like weired):');

$wp_customize->add_setting(
    'service_imgheight',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '382px', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'service_imgheight',
    array(
        'settings'      => 'service_imgheight',
        'section'       => 'service_area',
        'type'          => 'text',
        'label'         => __( 'Height:', 'luzuk-premium' )
    )
);