<?php 
/**
 * Createing an about us pannel for customizer
 */
// START ABOUT SECTION  
    $wp_customize->add_section(
        'counter_area',
        array(
            'title' => __( 'Counter Section', 'luzuk' ),
            'panel' => 'luzuk_premium_home_panel'
        )
    );
    // ENABLE/DISABLE FEATURED SECTION
    $wp_customize->add_setting(
        'counter_area_disable',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
        )
    );
    $wp_customize->add_control(
        new luzuk_Switch_Control(
            $wp_customize,
            'counter_area_disable',
            array(
                'settings'      => 'counter_area_disable',
                'section'       => 'counter_area',
                'label'         => __( 'Disable Section', 'luzuk' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk' ),
                    'off' => __( 'No', 'luzuk' )
                ),
            )
        )
    );



backgroundManager($wp_customize, 'ourinfo', 'counter_area', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');

addColorPalatOption($wp_customize, 'courHihglcolor', 'counter_area', 'Counter Section Highlight Color', '#fddb1f'); 

//section paddind
lzCustomLable($wp_customize, 'luzuk_counterpadding', 'counter_area', 'Section Padding Setting');
   
   //top
$wp_customize->add_setting(
    'countersectionTpadding', 
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'countersectionTpadding',
    array(
        'settings'      => 'countersectionTpadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Section Top Padding', 'luzuk' )
    )
);

//bottom
$wp_customize->add_setting(
    'countersectionBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'countersectionBpadding',
    array(
        'settings'      => 'countersectionBpadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( ' Section Bottom Padding', 'luzuk' )
    )
);

// //right
// $wp_customize->add_setting(
//     'countersectionRpadding', 
//     array(
//         'sanitize_callback' => 'luzuk_sanitize_text',
//         'default'           => __( '0em', 'luzuk' )
//     )
// );
// $wp_customize->add_control(
//     'countersectionRpadding',
//     array(
//         'settings'      => 'countersectionRpadding',
//         'section'       => 'counter_area',
//         'type'          => 'text',
//         'label'         => __( 'Section Right Padding', 'luzuk' )
//     )
// );
// //left
// $wp_customize->add_setting(
//     'countersectionLpadding',
//     array(
//         'sanitize_callback' => 'luzuk_sanitize_text',
//         'default'           => __( '0em', 'luzuk' )
//     )
// );
// $wp_customize->add_control(
//     'countersectionLpadding',
//     array(
//         'settings'      => 'countersectionLpadding',
//         'section'       => 'counter_area',
//         'type'          => 'text',
//         'label'         => __( ' Section Left Padding', 'luzuk' )
//     )
// );

lzCustomLable($wp_customize, 'counterbox_counterinnimg', 'counter_area', 'Counter Inner Image Setting');

backgroundManager($wp_customize, 'ourinfoinn', 'counter_area', $color='#fff', get_template_directory_uri().'/images/counter-bg.jpg', 'color'); 

addColorPalatOption($wp_customize, 'courinfoinnimgcolor', 'counter_area', 'Counter Inner Image Overlay Color', '#0664ad');

//counterwrapper paddind
lzCustomLable($wp_customize, 'counterbox_counterpadding', 'counter_area', 'Set Padding For Counter Inner Image');
   
   //top
$wp_customize->add_setting(
    'counterwrapperTpadding', 
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '9em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'counterwrapperTpadding',
    array(
        'settings'      => 'counterwrapperTpadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Counter Inner wrapper Top Padding', 'luzuk' )
    )
);

//bottom
$wp_customize->add_setting(
    'counterwrapperBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'counterwrapperBpadding',
    array(
        'settings'      => 'counterwrapperBpadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( ' Counter Inner wrapper Bottom Padding', 'luzuk' )
    )
);


$wp_customize->add_setting('luzuk_counter_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_counter_npp_heading',
        array(
            'settings'      => 'luzuk_counter_npp_heading',
            'section'       => 'counter_area',
            'label'         => __( 'Number Of Counter', 'luzuk' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_counter_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'luzuk_counter_npp_count',
    array(
        'settings'      => 'luzuk_counter_npp_count',
        'section'       => 'counter_area',
        'type'          => 'select',
        'label'         => __( 'Number of counter to show', 'luzuk' ),
        'choices'=>array(1,2,3,4,5,6)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'luzuk_counter_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_counter_header'.$i,
            array(
                'settings'      => 'luzuk_counter_header'.$i,
                'section'       => 'counter_area',
                'label'         => __( 'Counter ', 'luzuk' ).$i
            )
        )
    );

lzAddElement($wp_customize, 'lz_fitness_counter_page_number_'.$i, 'counter_area', $type = 'text', $label="Counter Number", $callback ='luzuk_sanitize_text', $default='250+');
lzAddElement($wp_customize, 'lz_fitness_counter_page_title_'.$i, 'counter_area', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Project Completed');
  
}

lzCustomLable($wp_customize, 'counter-color', 'counter_area', 'Counter Color');

// counter number color
addColorPalatOption($wp_customize, 'counter_NumberColor', 'counter_area', 'Count Number color', '#fddb1f');

addColorPalatOption($wp_customize, 'counter_NumberbgColor', 'counter_area', 'Count Number Background color', '#0664ad');

addColorPalatOption($wp_customize, 'counter_NumberbrdColor', 'counter_area', 'Count Number Border color', '#fddb1f');

addColorPalatOption($wp_customize, 'counterbox_titleColor', 'counter_area', 'Counter Title color', '#fff');


$wp_customize->add_setting(
        'counterbox_image_heading',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'counterbox_image_heading',
            array(
                'settings'      => 'counterbox_image_heading',
                'section'       => 'counter_area',
                'label'         => __( 'Right Side Image', 'luzuk-premium' ),
            )
        )
    );

      $wp_customize->add_setting(
        'coun_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'coun_image',
            array(
                'section' => 'counter_area',
                'settings' => 'coun_image',
                'description' => __('Recommended Image Size: 390X544px', 'luzuk-premium')
            )
        )
    );
