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

// START FACILITY SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_facility_section',
        array(
            'title' => __( 'Offers 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='#fff');
backgroundManager($wp_customize, 'facility', 'lz_fitness_premium_facility_section', $color='#efefef');

   
    $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'         => __( 'Offer Section Title & Subtitle', 'lz-fitness-premium' ),
            )
        )
    );    
    $wp_customize->add_setting(
        'lz_fitness_facility_title',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'WE OFFERS', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_facility_title',
        array(
            'settings'      => 'lz_fitness_facility_title',
            'section'       => 'lz_fitness_premium_facility_section',
            'type'          => 'text',
            'label'         => __( 'Title for section', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_setting(
        'lz_fitness_facility_sub_title',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
            'default'           => __( 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.', 'lz-fitness-premium' )
        )
    );
    $wp_customize->add_control(
        'lz_fitness_facility_sub_title',
        array(
            'settings'      => 'lz_fitness_facility_sub_title',
            'section'       => 'lz_fitness_premium_facility_section',
            'type'          => 'textarea',
            'label'         => __( 'Sub Title for section', 'lz-fitness-premium' )
        )
    );
    //lzAddElement($wp_customize, 'lz_fitness_about_sub_title', 'lz_fitness_premium_facility_section', 'textarea', $label="Sub Title", 'lz_fitness_sanitize_text', 'Business consulting excepteur sint occaecat cupidatat consulting non proident');

    // $wp_customize->add_setting(
    //     'lz_fitness_aboutus_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', 'lz-fitness-premium')
    //     )
    // );
    // $wp_customize->add_control(
    //     'lz_fitness_aboutus_text',
    //     array(
    //         'settings' =>'lz_fitness_aboutus_text',
    //         'section' => 'lz_fitness_premium_facility_section',
    //         'type'=> 'textarea',
    //         'label'=> __('Content for the section', 'lz-fitness-premium')
    //     )
    // );

    $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 Offer Plans', 'lz-fitness-premium' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_facility_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 7));
$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', 'lz-fitness-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8)
    )
);

//about PAGES
for( $i = 1; $i <= 8; $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'         => __( 'Our Offer', 'lz-fitness-premium' ).$i
            )
        )
    );
    lzAddImageElement($wp_customize, 'lz_fitness_facility_page_icon'.$i, 'lz_fitness_premium_facility_section', $label="Recommended Image Size: 150X150px");

lzAddElement($wp_customize, 'lz_fitness_facility_page_title_'.$i, 'lz_fitness_premium_facility_section', $type = 'text', $label="Title", $callback ='lz_fitness_sanitize_text', $default='Bachata');

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 vartins passes Lorem Ipsum available but the majority suffered.');

    
    // $wp_customize->add_setting(
    //     'lz_fitness_about_page'.$i,
    //     array(
    //         'sanitize_callback' => 'absint'
    //     )
    // );
    // $wp_customize->add_control(
    //     'lz_fitness_about_page'.$i,
    //     array(
    //         'settings'      => 'lz_fitness_about_page'.$i,
    //         'section'       => 'lz_fitness_premium_facility_section',
    //         'type'          => 'dropdown-pages',
    //         'label'         => __( 'Select a Page', 'lz-fitness-premium' )
    //     )
    // );
    // $wp_customize->add_setting(
    //     'lz_fitness_about_page_icon'.$i,
    //     array(
    //         'default'           => 'fa fa-bell',
    //         'sanitize_callback' => 'lz_fitness_sanitize_text'
    //     )
    // );        
    // $wp_customize->add_control(
    //     new lz_fitness_Fontawesome_Icon_Chooser(
    //         $wp_customize,
    //         'lz_fitness_about_page_icon'.$i,
    //         array(
    //             'settings'      => 'lz_fitness_about_page_icon'.$i,
    //             'section'       => 'lz_fitness_premium_facility_section',
    //             'type'          => 'icon',
    //             'label'         => __( 'FontAwesome Icon', 'lz-fitness-premium' ),
    //         )
    //     )
    // );  
   // lzAddElement($wp_customize, 'lz_fitness_facility_page_url_'.$i, 'lz_fitness_premium_facility_section', $type = 'text', $label="Button Link", $callback ='esc_url', $default='Add link here');

    /*code for button text*/
    // $wp_customize->add_setting(
    //     'lz_fitness_facility_page_button_title_'.$i,
    //     array(
    //         'sanitize_callback'=>'lz_fitness_sanitize_text',
    //         'default'=> __('Read More', 'lz-fitness-premium')
    //     )
    // );
    // $wp_customize->add_control(
    //     'lz_fitness_facility_page_button_title_'.$i,
    //     array(
    //         'settings' =>'lz_fitness_about_page_button_title_'.$i,
    //         'section' => 'lz_fitness_premium_facility_section',
    //         'type'=> 'text',
    //         'label'=> __('Button Text', 'lz-fitness-premium')
    //     )
    // );


}
// End Feature section 
  //main Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_MainHeadingColor', 'lz_fitness_premium_facility_section', 'Heading color ', '#ffffff');
    //main Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_facilitycolor_color', 'lz_fitness_premium_facility_section', 'Sub Heading color ', '#2b2b2b');

// Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_spanHeadingColor', 'lz_fitness_premium_facility_section', 'Heading Background color', '#69489d');
    // outline color 
    addColorPalatOption($wp_customize, 'lz_fitness_facility_spanoulineHeadingColor', 'lz_fitness_premium_facility_section', 'Outline Color', '#69489d');


    // Heading color
    //addColorPalatOption($wp_customize, 'lz_fitness_facility_SubHeadingColor', 'lz_fitness_premium_facility_section', 'Span Text color ', '#2b2b2b');
    // Title color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_TitleColor', 'lz_fitness_premium_facility_section', 'Title Color', '#ffffff');
    
    // Text color
    addColorPalatOption($wp_customize, 'lz_fitness_facility_TextColor', 'lz_fitness_premium_facility_section', 'Description color', '#ffffff');
    

    