<?php 
$wp_customize->add_section(
    'service_area',
    array(
        'title'         => __( 'Services Section', 'Luzuk' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);
$wp_customize->add_setting(
    'service_area_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_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, 'ser_sec_backgroundclr', 'service_area', 'Section BG Color Setting');

addColorPalatOption($wp_customize, 'service_secbgclr1', 'service_area', 'Section BG Color One', '#e6eef7');

addColorPalatOption($wp_customize, 'service_secbgclr2', 'service_area', 'Section BG Color Two', '#e6eef7');


lzCustomLable($wp_customize, 'luzuk_sec_servicessectionpadding', 'service_area', 'Section Padding');

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



$wp_customize->add_setting(
    'services_maintitle_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'services_maintitle_subtitle_heading',
        array(
            'settings'      => 'services_maintitle_subtitle_heading',
            'section'       => 'service_area',
            'label'         => __( 'Section Heading & Sub Heading', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting(
    'services_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'OUR SERVICE', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'services_maintitle',
    array(
        'settings'      => 'services_maintitle',
        'section'       => 'service_area', 
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'servicearea_sectitle_color', 'service_area', 'Section Heading color ', '#303030');

$wp_customize->add_setting(
    'services_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis.', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'services_subtitle',
    array(
        'settings'      => 'services_subtitle',
        'section'       => 'service_area', 
        'type'          => 'textarea',
        'label'         => __( 'Section Sub Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'servicearea_secsubtitle_color', 'service_area', 'Section Sub Heading Color ', '#6e7174');


$wp_customize->add_setting('service_area_lbl2', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'service_area_lbl2',
        array(
            'settings'      => 'service_area_lbl2',
            'section'       => 'service_area',
            'label'         => __( 'Note2:', 'Luzuk' ),  
            'description'   => __( 'Use Shortcode [SERVICES] To Show All Services In A Page', 'Luzuk' ),
        )
    )
);


$wp_customize->add_setting('service_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'service_npp_heading',
        array(
            'settings'      => 'service_npp_heading',
            'section'       => 'service_area',
            'label'         => __( 'Number Of Services To Show', 'Luzuk' ),
        )
    )
);    
$wp_customize->add_setting('service_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'service_npp_count',
    array(
        'settings'      => 'service_npp_count',
        'section'       => 'service_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Services To Show', 'Luzuk' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

$ServicesSingleChoice[] = 'Select';
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'services_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'services_heading'.$i,
            array(
                'settings'      => 'services_heading'.$i,
                'section'       => 'service_area',
                'label'         => __( 'Service Box ', 'Luzuk' ).$i,
            )
        )
    );
    if(is_array($ServicesSingleChoice)){
        $wp_customize->add_setting(
            'services_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'services_page'.$i,
            array(
                'settings'      => 'services_page'.$i,
                'section'       => 'service_area',
                'type'=> 'select',
                'label'         => __( 'Select A Service Box ', 'Luzuk' ),
                'choices' => $ServicesSingleChoice,
            )
        );

$wp_customize->add_setting(
        'services_page_icon1'.$i,
        array(
            'default'           => 'fa fa-cogs',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'services_page_icon1'.$i,
            array(
                'settings'      => 'services_page_icon1'.$i,
                'section'       => 'service_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'Luzuk' ),
            )
        )
    );

    }else{
        $wp_customize->add_setting('service_area_lbl'.$i, array('sanitize_callback'=>'luzuk_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_Info_Text( 
                $wp_customize,
                'service_area_lbl'.$i,
                array(
                    'settings'      => 'service_area_lbl'.$i,
                    'section'       => 'service_area',
                    'label'         => __( 'Note:', 'Luzuk' ),    
                    'description'   => __( '<strong>Changes will not reflect unless you select the Service Box.</strong> <br/>Please add the Services from "Services menu" and then select Services to show information.', 'Luzuk' ),
                )
            )
        );
    }
 
}


lzCustomLable($wp_customize, 'ser_sectioncolor', 'service_area', 'Section Color');

addColorPalatOption($wp_customize, 'services_Sbxclr', 'service_area', 'Section Box Color ', '#1d62b8');
addColorPalatOption($wp_customize, 'services_ServiceIconColor', 'service_area', 'Section Icon Color ', '#1d62b8');

addColorPalatOption($wp_customize, 'services_SerIconhnColor', 'service_area', 'Section Icon Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'services_SerIconhnbg', 'service_area', 'Section Icon BG Color ', '#fff');

addColorPalatOption($wp_customize, 'services_SerIconhnbghv', 'service_area', 'Section Icon BG Hover Color ', '#68a9fd');

addColorPalatOption($wp_customize, 'services_ServicePageTitleColor', 'service_area', 'Section Title Color ', '#fff');

addColorPalatOption($wp_customize, 'services_ServicePageTitlehvColor', 'service_area', 'Section Title Hover Color ', '#a5c0e3');

addColorPalatOption($wp_customize, 'services_ServicePageTextColor', 'service_area', 'Section Text Color ', '#a5c0e3');

lzCustomLable($wp_customize, 'ser_sectionboxbtn', 'service_area', 'Section Box Button Setting');

$wp_customize->add_setting( 'services_button1_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'services_button1_display', array( 'label' => 'Section Box Button Display', 'section' => 'service_area', 'settings' => 'services_button1_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) );

$wp_customize->add_setting(
        'servicesbutn_text1',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'READ MORE', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'servicesbutn_text1',
        array(
            'settings'      => 'servicesbutn_text1',
            'section'       => 'service_area',
            'type'          => 'text',
            'label'         => __( 'Add Button Text Here', 'Luzuk' )
        )
    );

addColorPalatOption($wp_customize, 'sersec_bxbtntxtclr', 'service_area', 'Section Box Button Color ', '#1d62b8');

addColorPalatOption($wp_customize, 'sersec_bxbtntxthvclr', 'service_area', 'Section Box Button Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'sersec_bxbtntxtbgclr', 'service_area', 'Section Box Button BG Color ', '#fff');

addColorPalatOption($wp_customize, 'sersec_bxbtntxtbghvclr', 'service_area', 'Section Box Button BG Hover Color ', '#68a9fd');
