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

// START FACILITY SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_facility_section',
        array(
            'title' => __( 'Facility Section', 'luzuk-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', 'luzuk-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );

    backgroundManager($wp_customize, 'facility', 'lz_fitness_premium_facility_section', $color='#fff');

    $wp_customize->add_setting(
        'lz_fitness_facility_title_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_facility_title_heading',
            array(
                'settings'      => 'lz_fitness_facility_title_heading',
                'section'       => 'lz_fitness_premium_facility_section',
                'label'         => __( 'Facility', 'luzuk-premium' ),
            )
        )
    );    
    $wp_customize->add_setting(
        'lz_fitness_facility_title',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'Available Facilities', 'luzuk-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_facility_title',
        array(
            'settings'      => 'lz_fitness_facility_title',
            'section'       => 'lz_fitness_premium_facility_section',
            'type'          => 'text',
            'label'         => __( 'Available Facilities', 'luzuk-premium' )
        )
    );

    //subtitle 
    lzAddElement($wp_customize, 'lz_fitness_facility_subTitle', 'lz_fitness_premium_facility_section', 'textarea', $label="Sub Title", 'lz_fitness_sanitize_text', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat');

    $wp_customize->add_setting(
        'lz_fitness_facility_text',
        array(
            'sanitize_callback'=>'lz_fitness_sanitize_text',
            'default'=> __('Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. <ul><li>Lorem ipsum dolor sit amet</li><li>Lorem ipsum dolor sit amet</li><li>Lorem ipsum dolor sit amet</li><li>Lorem ipsum dolor sit amet</li><li>Lorem ipsum dolor sit amet</li></ul>', 'luzuk-premium')
        )
    );
    $wp_customize->add_control(
        'lz_fitness_facility_text',
        array(
            'settings' =>'lz_fitness_facility_text',
            'section' => 'lz_fitness_premium_facility_section',
            'type'=> 'textarea',
            'label'=> __('Content for the section', 'luzuk-premium')
        )
    );

    // Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_HeadingColor', 'lz_fitness_premium_facility_section', 'Heading color', $headingColor);
    // Text color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_TextColor', 'lz_fitness_premium_facility_section', 'Text color', '#333333');

    $wp_customize->add_setting(
        'lz_fitness_facility_page',
        array(
            'sanitize_callback'=> 'absint',
            'default' => __('Facility Page Readmore Link', 'luzuk-premium')
        )
    );
    $wp_customize->add_control(
        'lz_fitness_facility_page',
        array(
            'settings'=> 'lz_fitness_facility_page',
            'section' => 'lz_fitness_premium_facility_section',
            'type'=>'select',
            'label'=>__('Link to Facility page', 'luzuk-premium'),
            'choices'=>$lz_fitness_page_choice
        )
    );
    $wp_customize->add_setting(
        'lz_fitness_facility_image_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_facility_image_heading',
            array(
                'settings'      => 'lz_fitness_facility_image_heading',
                'section'       => 'lz_fitness_premium_facility_section',
                'label'         => __( 'Left Image', 'luzuk-premium' ),
            )
        )
    );
    $wp_customize->add_setting(
        'lz_fitness_facility_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'lz_fitness_facility_image',
            array(
                'section' => 'lz_fitness_premium_facility_section',
                'settings' => 'lz_fitness_facility_image',
                'description' => __('Recommended Image Size: 500X600px', 'luzuk-premium')
            )
        )
    );


    // END FACILITY SECTION 