<?php
/**
 * Createing an featured new pannel for customizer
 *
 */

// START COUNTER SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_counter_section',
        array(
            'title' => __( 'Why Choose Us Section', 'lz-fitness-premium' ),
            'panel' => 'lz_fitness_premium_home_panel'
        )
    );
    // ENABLE/DISABLE COuNTER SECTION
    $wp_customize->add_setting(
        'lz_fitness_premium_counter_section_disable',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Switch_Control(
            $wp_customize,
            'lz_fitness_premium_counter_section_disable',
            array(
                'settings'      => 'lz_fitness_premium_counter_section_disable',
                'section'       => 'lz_fitness_premium_counter_section',
                'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'lz-fitness-premium' ),
                    'off' => __( 'No', 'lz-fitness-premium' )
                ),
            )
        )
    );

backgroundManager($wp_customize, 'counter', 'lz_fitness_premium_counter_section', $color='#1cb9c8', get_template_directory_uri().'/images/default-gray.png', 'img');

    $wp_customize->add_setting(
    'lz_fitness_counter_title_sub_title_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text'
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_counter_title_sub_title_heading',
        array(
            'settings'      => 'lz_fitness_counter_title_sub_title_heading',
            'section'       => 'lz_fitness_premium_counter_section',
            'label'         => __( 'Section Title', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting(
    'lz_fitness_counter_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'WHY CHOOSE US', 'gurukul' )
    )
);
$wp_customize->add_control(
    'lz_fitness_counter_title',
    array(
        'settings'      => 'lz_fitness_counter_title',
        'section'       => 'lz_fitness_premium_counter_section',
        'type'          => 'text',
        'label'         => __( 'Title', 'gurukul' )
    )
);

    // Heading color
    addColorPalatOption($wp_customize, 'lz_fitness_counter_HeadingColor', 'lz_fitness_premium_counter_section', 'Heading color', '#fff');
   
  // border color
    addColorPalatOption($wp_customize, 'lz_fitness_counter_borderColor', 'lz_fitness_premium_counter_section', 'Border color', '#fff');
   
    
$wp_customize->add_setting('lz_fitness_counter_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_counter_npp_heading',
        array(
            'settings'      => 'lz_fitness_counter_npp_heading',
            'section'       => 'lz_fitness_premium_counter_section',
            'label'         => __( 'Number Of Counter', 'gurukul' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_counter_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 2));
$wp_customize->add_control(
    'lz_fitness_counter_npp_count',
    array(
        'settings'      => 'lz_fitness_counter_npp_count',
        'section'       => 'lz_fitness_premium_counter_section',
        'type'          => 'select',
        'label'         => __( 'Number of counter to show', 'gurukul' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_counter_header'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_counter_header'.$i,
            array(
                'settings'      => 'lz_fitness_counter_header'.$i,
                'section'       => 'lz_fitness_premium_counter_section',
                'label'         => __( 'Counter ', 'gurukul' ).$i
            )
        )
    );

lzAddElement($wp_customize, 'lz_fitness_counter_page_number_'.$i, 'lz_fitness_premium_counter_section', $type = 'text', $label="Counter Number", $callback ='lz_fitness_sanitize_text', $default='125');
lzAddElement($wp_customize, 'lz_fitness_counter_page_title_'.$i, 'lz_fitness_premium_counter_section', $type = 'text', $label="Title", $callback ='lz_fitness_sanitize_text', $default='Staff');
  
}

// counter number color
    addColorPalatOption($wp_customize, 'lz_fitness_counternumColor', 'lz_fitness_premium_counter_section', 'Counter color', '#fff');

    // counter border color
    addColorPalatOption($wp_customize, 'lz_fitness_counternum_borderColor', 'lz_fitness_premium_counter_section', 'Counter border color', '#fff');


    // counter member color
    addColorPalatOption($wp_customize, 'lz_fitness_counternum_memberColor', 'lz_fitness_premium_counter_section', 'Counter member color', '#fff');


// End counter section 