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

// START COUNTER SECTION 
    $wp_customize->add_section(
        'lz_fitness_premium_counter_section',
        array(
            'title' => __( 'Counter 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='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');



$wp_customize->add_setting(
    'lz_fitness_premium_counter_title_subtitle_heading',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
    )
);
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_premium_counter_title_subtitle_heading',
        array(
            'settings'      => 'lz_fitness_premium_counter_title_subtitle_heading',
            'section'       => 'lz_fitness_premium_counter_section',
            'label'         => __( 'Section Title & Section Subtitle', 'lz-fitness-premium' ),
        )
    )
);


$wp_customize->add_setting(
    'lz_fitness_countersec_title',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Aenean vestibulum tortor erat nec tincidunt ex molestie vel Nam lacus', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_countersec_title',
    array(
        'settings'      => 'lz_fitness_countersec_title',
        'section'       => 'lz_fitness_premium_counter_section',
        'type'          => 'textarea',
        'label'         => __( 'Section Title', 'lz-fitness-premium' )
    )
);

addColorPalatOption($wp_customize, 'lz_fitness_counter_sectionttlcolor', 'lz_fitness_premium_counter_section', 'Section Title color', '#313131');


$wp_customize->add_setting(
    'lz_fitness_counter_subtitle',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( 'Adipiscing elit. Vivamus eu pharetra ex. Etiam eget diam ligula. Sed blandit ante. Vivamus feugiat.', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'lz_fitness_counter_subtitle',
    array(
        'settings'      => 'lz_fitness_counter_subtitle',
        'section'       => 'lz_fitness_premium_counter_section',
        'type'          => 'textarea',
        'label'         => __( 'Section Sub Title', 'lz-fitness-premium' )
    )
);

addColorPalatOption($wp_customize, 'lz_fitness_counter_sectionsubttlcolor', 'lz_fitness_premium_counter_section', 'Section Sub Title color', '#6d6c6c');


$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', 'Hexagon' ),
        )
    )
);    
$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', 'Hexagon' ),
        '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 ', 'Hexagon' ).$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='150');
lzAddElement($wp_customize, 'lz_fitness_counter_page_title_'.$i, 'lz_fitness_premium_counter_section', $type = 'text', $label="Title", $callback ='lz_fitness_sanitize_text', $default='Management Team');
  
}




// counter number color
    addColorPalatOption($wp_customize, 'lz_fitness_countersecnumtextColor', 'lz_fitness_premium_counter_section', 'Counter Number Text color', '#b099dd');
    addColorPalatOption($wp_customize, 'lz_fitness_countersecnumtexthoverColor', 'lz_fitness_premium_counter_section', 'Counter Number Text Hover color', '#6843c4');

    // counter member color
    addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_numbertitleColor', 'lz_fitness_premium_counter_section', 'Counter title color', '#2f2f2f');
    addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_numbertitlehvrColor', 'lz_fitness_premium_counter_section', 'Counter title Hover color', '#6d6c6c');


        addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_mainbxhgtbrssColor', 'lz_fitness_premium_counter_section', 'Counter Box Background color', '#fff');
    addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_hoverbgsscolorColor', 'lz_fitness_premium_counter_section', 'Counter Box Hover Background color', '#fff');

    addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_mainbxbgColor', 'lz_fitness_premium_counter_section', 'Counter Box Border color', '#b099dd');

    addColorPalatOption($wp_customize, 'lz_fitness_countersecnum_hvrhihghlightbgssColor', 'lz_fitness_premium_counter_section', 'Counter Box Hover Border color', '#6943c4');
