<?php
/**
 * Createing an Our Pets pannel for customizer
 */

// START ABOUT SECTION 
$wp_customize->add_section(
    'facility_section',
    array(
        'title' => __( 'Facility Section', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel'
    )
);
    // ENABLE/DISABLE FEATURED SECTION
$wp_customize->add_setting(
    'facility_section_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'facility_section_disable',
        array(
            'settings'      => 'facility_section_disable',
            'section'       => 'facility_section',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            ),
        )
    )
);

backgroundManager($wp_customize, 'facility', 'facility_section', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');


lzCustomLable($wp_customize, 'luzuk_facilitysectionpadding', 'facility_section', 'Section Padding');

$wp_customize->add_setting(
    'sec_facilityTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '4em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_facilityTpadding',
    array(
        'settings'      => 'sec_facilityTpadding',
        'section'       => 'facility_section',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_facilityBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '2em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_facilityBpadding',
    array(
        'settings'      => 'sec_facilityBpadding',
        'section'       => 'facility_section',
        'type'          => 'text',
        'label'         => __( 'Section Bottom Padding', 'luzuk' )
    )
);


lzCustomLable($wp_customize, 'luzuk_featurheading', 'facility_section', 'Section Heading');


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

addColorPalatOption($wp_customize, 'fac_headingclr', 'facility_section', 'Section Heading Color', '#000');

addColorPalatOption($wp_customize, 'fac_headingbrdclr', 'facility_section', 'Section Heading Border Color', '#01b9fd');

$wp_customize->add_setting('luzuk_facilityslb_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_facilityslb_section_lbl',
        array(
            'settings'      => 'luzuk_facilityslb_section_lbl',
            'section'       => 'facility_section',
            'label'         => __( 'Note:', 'Luzuk' ),    
            'description'   => __( 'Changes will not reflect unless you select an image', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('luzuk_facility_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_facility_npp_heading',
        array(
            'settings'      => 'luzuk_facility_npp_heading',
            'section'       => 'facility_section',
            'label'         => __( 'Number Of facility To Show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_facility_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 7));
$wp_customize->add_control(
    'luzuk_facility_npp_count',
    array(
        'settings'      => 'luzuk_facility_npp_count',
        'section'       => 'facility_section',
        'type'          => 'select',
        'label'         => __( 'Number of Section Box to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

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


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

lzAddElement($wp_customize, 'facility_page_title_'.$i, 'facility_section', $type = 'text', $label="Section Title", $callback ='luzuk_sanitize_text', $default='Conference Room');


lzAddElement($wp_customize, 'fea_page_text'.$i, 'facility_section', $type = 'textarea', $label="Description", $callback ='luzuk_sanitize_text', $default='It is a long established fact that a reader will be distracted by the readable content of a page');

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

}
  
lzCustomLable($wp_customize, 'facilitycolor', 'facility_section', 'Section Colors');

addColorPalatOption($wp_customize, 'membe_pagebxbg', 'facility_section', 'Section Box Background Color', '#fff');

addColorPalatOption($wp_customize, 'membe_pagebxbghv', 'facility_section', 'Section Box Background Hover Color', '#bef1e8');

addColorPalatOption($wp_customize, 'membe_picn1crlbg', 'facility_section', 'Section Icon Frist Circle Background Color', '#ededed');

addColorPalatOption($wp_customize, 'membe_picn2crlbg1', 'facility_section', 'Section Icon Second Circle Background Color One', '#01b9fd');

addColorPalatOption($wp_customize, 'membe_picn2crlbg2', 'facility_section', 'Section Icon Second Circle Background Color Two', '#55e3ca');

addColorPalatOption($wp_customize, 'membe_pageicn', 'facility_section', 'Section Icon Color', '#fff');

addColorPalatOption($wp_customize, 'membe_pagettl', 'facility_section', 'Section Title Color ', '#000');

addColorPalatOption($wp_customize, 'membe_pagettlhv', 'facility_section', 'Section Title Hover Color ', '#000');

addColorPalatOption($wp_customize, 'membe_pagetxt', 'facility_section', 'Section Text Color ', '#727070');

addColorPalatOption($wp_customize, 'membe_pagetxthv', 'facility_section', 'Section Text Hover Color ', '#000');