<?php
/**
 * Createing an Facility pannel for customizer
 *
 */

// START FACILITY SECTION 
    $wp_customize->add_section(
        'premium_facility_section',
        array(
            'title' => __( 'Facility Section', 'luzuk-premium' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'premium_facility_section_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'premium_facility_section_disable',
            array(
                'settings'      => 'premium_facility_section_disable',
                'section'       => 'premium_facility_section',
                'label'         => __( 'Disable Section', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );
backgroundManager($wp_customize, 'facility', 'premium_facility_section', $color='#fff', get_template_directory_uri().'/images/facility.jpg', 'color');

lzCustomLable($wp_customize, 'luzuk_sec_servicessectionpadding', 'premium_facility_section', 'Section Padding:');

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

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


$wp_customize->add_setting(
    'facility_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'OUR FACILITY', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_title',
    array(
        'settings'      => 'facility_title',
        'section'       => 'premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'luzuk-premium' )
    )
);

 // Heading color
addColorPalatOption($wp_customize, 'facility_HeadingColor', 'premium_facility_section', 'Section Heading Color', '#ffffff');


$wp_customize->add_setting('facility_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'facility_npp_heading',
        array(
            'settings'      => 'facility_npp_heading',
            'section'       => 'premium_facility_section',
            'label'         => __( 'Number Of Facility Plans', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('facility_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'facility_npp_count',
    array(
        'settings'      => 'facility_npp_count',
        'section'       => 'premium_facility_section',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 8; $i++ ){
    $wp_customize->add_setting(
        'facility_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'facility_header'.$i,
            array(
                'settings'      => 'facility_header'.$i,
                'section'       => 'premium_facility_section',
                'label'         => __( 'Facility Page ', 'luzuk-premium' ).$i
            )
        )
    );

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

lzAddElement($wp_customize, 'facility_page_title_'.$i, 'premium_facility_section', $type = 'text', $label="Section Icon Title", $callback ='luzuk_sanitize_text', $default='<span>Technology</span> Services');

lzAddElement($wp_customize, 'facility_page_desc_'.$i, 'premium_facility_section', $type = 'textarea', $label="Section Content", $callback ='luzuk_sanitize_text', $default='Our CoE leads work directly with customers in this large and first phase.');


lzAddElement($wp_customize, 'facility_page_url_'.$i, 'premium_facility_section', $type = 'text', $label="Facility Page Link", $callback ='esc_url', $default='Add link here');
    
}


$wp_customize->add_setting(
    'facility_one',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'System', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_one',
    array(
        'settings'      => 'facility_one',
        'section'       => 'premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Facility Heading One', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'facility_two',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Technology', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_two',
    array(
        'settings'      => 'facility_two',
        'section'       => 'premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Facility Heading Two', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'facility_three',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Innovate', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_three',
    array(
        'settings'      => 'facility_three',
        'section'       => 'premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Facility Heading Three', 'luzuk-premium' )
    )
);

$wp_customize->add_setting(
    'facility_four',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Network', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'facility_four',
    array(
        'settings'      => 'facility_four',
        'section'       => 'premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Facility Heading Four', 'luzuk-premium' )
    )
);
addColorPalatOption($wp_customize, 'facility_HygeadingAllColor', 'premium_facility_section', 'All Heading Color', '#fff');
addColorPalatOption($wp_customize, 'facility_HeadingAllBorderColor', 'premium_facility_section', 'All Heading Borders Color', '#0612a6');



lzCustomLable($wp_customize, 'sec_facilitycolor', 'premium_facility_section', 'Section Color');

// icon color
addColorPalatOption($wp_customize, 'facility_iconColor', 'premium_facility_section', 'Icon Color', '#fff');

// icon hover color
addColorPalatOption($wp_customize, 'facility_iconhoverColor', 'premium_facility_section', 'Icon hover Color', '#ff5317');

// title color
addColorPalatOption($wp_customize, 'facilityTitleHighlightColor', 'premium_facility_section', 'First Title Color', '#ff5317');

addColorPalatOption($wp_customize, 'facility_titleColor', 'premium_facility_section', 'Second Title Color', '#fff');

// title hover color
addColorPalatOption($wp_customize, 'facility_titlehoverColor', 'premium_facility_section', 'Second Title Hover Color', '#ff5317');


addColorPalatOption($wp_customize, 'facilityContentColor', 'premium_facility_section', 'Text Color', '#fff');

// box bg color
// addColorPalatOption($wp_customize, 'facility_boxbgColor', 'premium_facility_section', 'Box Background Color', '#001b42');

// addColorPalatOption($wp_customize, 'facility_boxbghvClr1', 'premium_facility_section', 'Box Background Hover Color One', '#f1f1f1');

// addColorPalatOption($wp_customize, 'facility_boxbghvClr2', 'premium_facility_section', 'Box Background Hover Color Two', '#f3f3f3');

// End facility section 