<?php 
    $wp_customize->add_section(
        'facility_area',
        array(
            'title' => __( 'Facility Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );

    $wp_customize->add_setting(
        'facility_area_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'facility_area_disable',
            array(
                'settings'      => 'facility_area_disable',
                'section'       => 'facility_area',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    ); 

backgroundManager($wp_customize, 'facilityus', 'facility_area', $color='#fff', get_template_directory_uri().'/images/facilitybg.png', 'color');

lzCustomLable($wp_customize, 'facilityarea_padding', 'facility_area', 'Section Padding');

$wp_customize->add_setting(
    'facility_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_areaTpadding',
    array(
        'settings'      => 'facility_areaTpadding',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'facility_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '22em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_areaBpadding',
    array(
        'settings'      => 'facility_areaBpadding',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);


$wp_customize->add_setting(
    'facility_title_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facility_title_heading',
        array(
            'settings'      => 'facility_title_heading',
            'section'       => 'facility_area',
            'label'         => __( 'Section Heading ', 'luzuk-premium' ),
        )
    )
);    


$wp_customize->add_setting(
    'facility_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Our Facility ', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_heading',
    array(
        'settings'      => 'facility_heading',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'facility_Heading_clr', 'facility_area', 'Section Heading Color ', '#000');


$wp_customize->add_setting(
    'facsubtext',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Generators On The Internet Tend To Repeat', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facsubtext',
    array(
        'settings'      => 'facsubtext',
        'section'       => 'facility_area',
        'type'          => 'textarea',
        'label'         => __( 'Section Sub Heading', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'facility_subHeading_clr', 'facility_area', 'Section Sub Heading Color ', '#007EFF');

$wp_customize->add_setting(
    'facbtn_text',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'See All', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'facbtn_text',
    array(
        'settings'      => 'facbtn_text',
        'section'       => 'facility_area',
        'type'          => 'text',
        'label'         => __( 'Button Text ', 'Luzuk' )
    )
);

$wp_customize->add_setting('facbtnlink',   
    array('default'=> 'Add Link', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('facbtnlink',
    array(
        'settings'      => 'facbtnlink',
        'section'       => 'facility_area',
        'type'          => 'url',
        'label'         => __( 'Button Link ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'facility_btnclr', 'facility_area', 'Section Button Text Color ', '#007EFF');

addColorPalatOption($wp_customize, 'facility_btnhvclr', 'facility_area', 'Section Button Text Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'facility_btnbrdclr', 'facility_area', 'Section Button Border Color ', '#007EFF');

addColorPalatOption($wp_customize, 'facility_btnbrdhv', 'facility_area', 'Section Button Border Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'facility_btnbghv', 'facility_area', 'Section Button BG Hover Color ', '#2E8BE9');

lzCustomLable($wp_customize, 'facilityarea_lhsside', 'facility_area', 'Left Side');

$wp_customize->add_setting('facilityus_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facilityus_npp_heading',
        array(
            'settings'      => 'facilityus_npp_heading',
            'section'       => 'facility_area',
            'label'         => __( 'Number Of Facility Box', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('facilityus_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 1));
$wp_customize->add_control(
    'facilityus_npp_count',
    array(
        'settings'      => 'facilityus_npp_count',
        'section'       => 'facility_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Facility Box To Show', 'luzuk-premium' ),
        'choices'=>array(1,2,3)
    )
);

//facility PAGES
for( $i = 1; $i <= 3; $i++ ){
    $wp_customize->add_setting(
        'facilityus_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'facilityus_header'.$i,
            array(
                'settings'      => 'facilityus_header'.$i,
                'section'       => 'facility_area',
                'label'         => __( 'Section Box ', 'luzuk-premium' ).$i
            )
        )
    );

     $wp_customize->add_setting(
        'facilityus_page_icon'.$i,
        array(
            'default'           => 'fa fa-globe',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'facilityus_page_icon'.$i,
            array(
                'settings'      => 'facilityus_page_icon'.$i,
                'section'       => 'facility_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );


lzAddElement($wp_customize, 'facilityus_page_title'.$i, 'facility_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Text here');

lzAddElement($wp_customize, 'luzuk_facility_page_url_'.$i, 'facility_area', $type = 'text', $label="Link", $callback ='esc_url', $default='Add link here');

lzAddElement($wp_customize, 'facility_txt'.$i, 'facility_area', $type = 'textarea', $label="Text", $callback ='luzuk_sanitize_text', $default='There are many variations of passages of Lorem Ipsum');

}

lzCustomLable($wp_customize, 'facilityarea_rhsside', 'facility_area', 'Right Side');

$wp_customize->add_setting('facilityus_npp_heading_rhs',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facilityus_npp_heading_rhs',
        array(
            'settings'      => 'facilityus_npp_heading_rhs',
            'section'       => 'facility_area',
            'label'         => __( 'Number Of Facility Box', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('facilityus_npp_count_rhs',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 1));
$wp_customize->add_control(
    'facilityus_npp_count_rhs',
    array(
        'settings'      => 'facilityus_npp_count_rhs',
        'section'       => 'facility_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Facility Box To Show', 'luzuk-premium' ),
        'choices'=>array(1,2,3)
    )
);

//facility PAGES
for( $i = 1; $i <= 3; $i++ ){
    $wp_customize->add_setting(
        'facilityus_header_rhs'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'facilityus_header_rhs'.$i,
            array(
                'settings'      => 'facilityus_header_rhs'.$i,
                'section'       => 'facility_area',
                'label'         => __( 'Section Box ', 'luzuk-premium' ).$i
            )
        )
    );

     $wp_customize->add_setting(
        'facilityus_page_icon_rhs'.$i,
        array(
            'default'           => 'fa fa-clock-o',
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new luzuk_Fontawesome_Icon_Chooser(
            $wp_customize,
            'facilityus_page_icon_rhs'.$i,
            array(
                'settings'      => 'facilityus_page_icon_rhs'.$i,
                'section'       => 'facility_area',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'luzuk-premium' ),
            )
        )
    );


lzAddElement($wp_customize, 'facilityus_page_title_rhs'.$i, 'facility_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Text here');

lzAddElement($wp_customize, 'luzuk_facility_page_rhs_url_'.$i, 'facility_area', $type = 'text', $label="Link", $callback ='esc_url', $default='Add link here');

lzAddElement($wp_customize, 'facility_rhs_txt'.$i, 'facility_area', $type = 'textarea', $label="Text", $callback ='luzuk_sanitize_text', $default='There are many variations of passages of Lorem Ipsum');

}

lzCustomLable($wp_customize, 'feasecimg', 'facility_area' , 'Section Image');
$wp_customize->add_setting(
    'fac_image',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);

$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'fac_image',
        array(
            'section' => 'facility_area',
            'settings' => 'fac_image',
            'description' => __('Recommended Image Size: 600X600px', 'luzuk-premium')
        )
    )
);

lzCustomLable($wp_customize, 'fac-clr', 'facility_area' , 'Facility Section Color');

addColorPalatOption($wp_customize, 'facility_area_movecir', 'facility_area', 'Section Moving Circle Color', '#efefef');

addColorPalatOption($wp_customize, 'facility_area_title', 'facility_area', 'Section Icon Title Color', '#000');

addColorPalatOption($wp_customize, 'facility_area_txt', 'facility_area', 'Section Icon Text Color', '#7f7f7f');

addColorPalatOption($wp_customize, 'facility_area_txtbrd', 'facility_area', 'Section Text Border Color', '#033A9E');

addColorPalatOption($wp_customize, 'facility_area_icon', 'facility_area', 'Section Icon Color', '#fff');

addColorPalatOption($wp_customize, 'facility_area_iconbg1', 'facility_area', 'Section Icon BG Color 1', '#033A9E');

addColorPalatOption($wp_customize, 'facility_area_iconbg2', 'facility_area', 'Section Icon BG Color 2', '#2E8BE9');

