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

// START FACILITY SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_facility_section',
        array(
            'title' => __( 'Facility Section', 'lz-fitness-premium' ),
            'panel' => 'lz_fitness_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'lz_fitness_premium_facility_section_disable',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'lz_fitness_premium_facility_section_disable',
            array(
                'settings'      => 'lz_fitness_premium_facility_section_disable',
                'section'       => 'lz_fitness_premium_facility_section',
                'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lz-fitness-premium' ),
                    'off' => __( 'No', 'lz-fitness-premium' )
                ),
            )
        )
    );
backgroundManager($wp_customize, 'facility', 'lz_fitness_premium_facility_section', $color='#ff6796', get_template_directory_uri().'/images/default-gray.png', 'img');

    $wp_customize->add_setting(
    'lz_fitness_facility_title_sub_title_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text'
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_facility_title_sub_title_heading',
        array(
            'settings'      => 'lz_fitness_facility_title_sub_title_heading',
            'section'       => 'lz_fitness_premium_facility_section',
            'label'         => __( 'Section Title', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting(
    'lz_fitness_facility_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Our Features', 'gurukul' )
    )
);
$wp_customize->add_control(
    'lz_fitness_facility_title',
    array(
        'settings'      => 'lz_fitness_facility_title',
        'section'       => 'lz_fitness_premium_facility_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'gurukul' )
    )
);

    // Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_HeadingColor', 'lz_fitness_premium_facility_section', 'Heading color', '#fff');

    // Heading border color
addColorPalatOption($wp_customize, 'lz_fitness_facility_HeadingborderColor', 'lz_fitness_premium_facility_section', 'Section Heading border color', '#fff');
// Heading border icon color
addColorPalatOption($wp_customize, 'lz_fitness_facility_HeadingbordericonColor', 'lz_fitness_premium_facility_section', 'Section Heading border icon color', '#fff');

$wp_customize->add_setting('lz_fitness_facility_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_facility_npp_heading',
        array(
            'settings'      => 'lz_fitness_facility_npp_heading',
            'section'       => 'lz_fitness_premium_facility_section',
            'label'         => __( 'Number Of Facility Plans', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_facility_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 2));
$wp_customize->add_control(
    'lz_fitness_facility_npp_count',
    array(
        'settings'      => 'lz_fitness_facility_npp_count',
        'section'       => 'lz_fitness_premium_facility_section',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'gurukul' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 9; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_facility_header'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_facility_header'.$i,
            array(
                'settings'      => 'lz_fitness_facility_header'.$i,
                'section'       => 'lz_fitness_premium_facility_section',
                'label'         => __( 'Facility Page ', 'gurukul' ).$i
            )
        )
    );

     $wp_customize->add_setting(
        'lz_fitness_facility_page_icon'.$i,
        array(
            'default'           => 'fa fa-sign-language',
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new lz_fitness_Fontawesome_Icon_Chooser(
            $wp_customize,
            'lz_fitness_facility_page_icon'.$i,
            array(
                'settings'      => 'lz_fitness_facility_page_icon'.$i,
                'section'       => 'lz_fitness_premium_facility_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'gurukul' ),
            )
        )
    );

lzAddElement($wp_customize, 'lz_fitness_facility_page_title_'.$i, 'lz_fitness_premium_facility_section', $type = 'text', $label="Title", $callback ='lz_fitness_sanitize_text', $default='Creativity');
lzAddElement($wp_customize, 'lz_fitness_facility_page_description_'.$i, 'lz_fitness_premium_facility_section', $type = 'textarea', $label="Description", $callback ='lz_fitness_sanitize_text', $default='There are many variations passages Lorem Ipsum available, but majority have suffered.');
    
}

     // icon color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_iconColor', 'lz_fitness_premium_facility_section', 'Icon color', '#fff');

       // icon hover bg color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_iconhoverbgColor', 'lz_fitness_premium_facility_section', 'Icon hover background color', '#fff');

        // icon hover color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_iconhoverColor', 'lz_fitness_premium_facility_section', 'Icon hover color', '#ff6796');


 // title color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_titleColor', 'lz_fitness_premium_facility_section', 'Title color', '#fff');

 // title hover color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_titlehoverColor', 'lz_fitness_premium_facility_section', 'Title hover color', '#01beff');

     // description color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_descripColor', 'lz_fitness_premium_facility_section', 'Description color', '#fff');

// End facility section 