<?php  

$wp_customize->add_section(
    'counter_area',
    array(
        'title' => __('Counter Section', 'luzuk-premium' ),
        '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-premium' ),
                'on_off_label'  => array(
                    'on' => __( 'Yes', 'luzuk-premium' ),
                    'off' => __( 'No', 'luzuk-premium' )
                ),
            )
        )
    );

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


lzCustomLable($wp_customize, 'countersection_padding', 'counter_area', ' Section Padding ');

$wp_customize->add_setting(
    'countersection_toppadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'countersection_toppadding',
    array(
        'settings'      => 'countersection_toppadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'countersection_bottompadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '16em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'countersection_bottompadding',
    array(
        'settings'      => 'countersection_bottompadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);



lzCustomLable($wp_customize, 'counterearea_conwidth', 'counter_area', 'Section Width ');

$wp_customize->add_setting('counter_c_width',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 'container-fluid'));
$wp_customize->add_control( new Luzuk_Custom_Select_Control( $wp_customize, 'counter_c_width', array(
    'label'    => __( '', 'luzuk' ),
    'section'  => 'counter_area', // Replace with your actual section ID
    'settings' => 'counter_c_width',
    'choices'=>array(
       'container' => 'Box Width',
       'container-fluid' => 'Full Width',
       
    )
) ) );

lzCustomLable($wp_customize, 'counter_headingaling', 'counter_area', 'Heading Alignment');

$wp_customize->add_setting('counter_maintitle_align',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 'right'));
$wp_customize->add_control( new Luzuk_Custom_Select_Control( $wp_customize, 'counter_maintitle_align', array(
    'label'    => __( '', 'luzuk' ),
    'section'  => 'counter_area', // Replace with your actual section ID
    'settings' => 'counter_maintitle_align',
    'choices'=>array(
       'left' => 'Left',
       'center' => 'Center',
       'right' => 'Right',
    )
) ) );


lzCustomLable($wp_customize, 'counter_headingcase', 'counter_area', 'Heading Style');

$wp_customize->add_setting('counter_maintitle_case',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 'uppercase'));
$wp_customize->add_control( new Luzuk_Custom_Select_Control( $wp_customize, 'counter_maintitle_case', array(
    'label'    => __( '', 'luzuk' ),
    'section'  => 'counter_area', // Replace with your actual section ID
    'settings' => 'counter_maintitle_case',
    'choices'=>array(
       'uppercase' => 'Uppercase',
       'lowercase' => 'Lowercase',
       'capitalize' => 'Capitalize',
    )
) ) );


$wp_customize->add_setting(
    'counter_heading_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'counter_heading_heading',
        array(
            'settings'      => 'counter_heading_heading',
            'section'       => 'counter_area',
            'label'         => __( 'Section Heading', 'luzuk-premium' ),
        )
    )
);


$wp_customize->add_setting(
    'counter_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Emergency', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'counter_heading',
    array(
        'settings'      => 'counter_heading',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Heading ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'counter_Heading', 'counter_area', 'Heading Color', '#d1d2d6');

$wp_customize->add_setting(
    'counter_subheading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Emergency', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'counter_subheading',
    array(
        'settings'      => 'counter_subheading',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Sub Heading ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'counter_subHeadingicn', 'counter_area', 'Sub Heading Icon Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_subHeading', 'counter_area', 'Sub Heading Color', '#24345D');

$wp_customize->add_setting(
    'counter_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Emergency', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'counter_title',
    array(
        'settings'      => 'counter_title',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Title ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'counter_Title', 'counter_area', 'Title Color', '#24345D');

$wp_customize->add_setting(
    'ph_no',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '123-456-798', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'ph_no',
    array(
        'settings'      => 'ph_no',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Phone Number ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'counter_phbxbrd', 'counter_area', 'Phone Box Border Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_phicnbg', 'counter_area', 'Phone Icon BG Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_phicn', 'counter_area', 'Phone Icon Color', '#fff');

addColorPalatOption($wp_customize, 'counter_phno', 'counter_area', 'Phone Number Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_phnohv', 'counter_area', 'Phone Number Hover Color', '#24345D');

addColorPalatOption($wp_customize, 'counter_phbx', 'counter_area', 'Box Color', '#fff');

lzCustomLable($wp_customize, 'counter_simg', 'counter_area', 'Section Lamp Image');

$wp_customize->add_setting(
    'counter_head',
    array(
        'sanitize_callback' => 'esc_url_raw'
    )
);

$wp_customize->add_control(
    new WP_Customize_Image_Control(
        $wp_customize,
        'counter_head',
        array(
            'section' => 'counter_area',
            'settings' => 'counter_head',
             'description' => __('Recommended Image Size: 525X265', 'luzuk-premium')
        )
    )
);

$wp_customize->add_setting( 'counter_img_display' , array( 'default' => true, 'transport' => 'refresh', ) ); 
$wp_customize->add_control( 'counter_img_display', array( 'label' => 'Lamp Image Display', 'section' => 'counter_area', 'settings' => 'counter_img_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show ', 'hide' => 'Hide ', ), ) ); 

lzCustomLable($wp_customize, 'counterearea_rightbx', 'counter_area', 'Right Box ');

backgroundManager($wp_customize, 'counterinn', 'counter_area', $color='#fff', get_template_directory_uri().'/images/counterbg.jpg', 'color');


lzCustomLable($wp_customize, 'counterearea_imgopcty', 'counter_area', 'Image Opacity ');

$wp_customize->add_setting(
    'counter_areaOpacity',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '0.8', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'counter_areaOpacity',
    array(
        'settings'      => 'counter_areaOpacity',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Opacity', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'counter_imgolyClr', 'counter_area', 'Image Overlay Color', '#24345D');

$wp_customize->add_setting('counter_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'counter_npp_heading',
        array(
            'settings'      => 'counter_npp_heading',
            'section'       => 'counter_area',
            'label'         => __( 'Number Of Counter To Show', 'Luzuk Premium' ),
        )
    )
);    


$wp_customize->add_setting('counter_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control( new Luzuk_Custom_Select_Control( $wp_customize, 'counter_npp_count', array(
        'label'    => __( '', 'luzuk' ),
        'section'  => 'counter_area', // Replace with your actual section ID
        'settings' => 'counter_npp_count',
        'choices'=>array(1,2,3,4,5,6)
    ) ) );


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

    //     $wp_customize->add_setting(
    //     'counter_page_icon'.$i,
    //     array(
    //         'default'           => 'fa fa-user-plus',
    //         'sanitize_callback' => 'luzuk_sanitize_text'
    //     )
    // );        
    // $wp_customize->add_control(
    //     new luzuk_Fontawesome_Icon_Chooser(
    //         $wp_customize,
    //         'counter_page_icon'.$i,
    //         array(
    //             'settings'      => 'counter_page_icon'.$i,
    //             'section'       => 'counter_area',
    //             'type'          => 'icon',
    //             'label'         => __( 'FontAwesome Icon', 'Luzuk Premium' ),
    //         )
    //     )
    // );
lzAddElement($wp_customize, 'counter_page_num'.$i, 'counter_area', $type = 'text', $label="Counter Number", $callback ='luzuk_sanitize_text', $default='199');

lzAddElement($wp_customize, 'counter_page_title'.$i, 'counter_area', $type = 'text', $label="Counter Title", $callback ='luzuk_sanitize_text', $default='New Building & User');
    
}


lzCustomLable($wp_customize, 'counter_sectioncolor', 'counter_area', ' Section Color');

addColorPalatOption($wp_customize, 'counter_numbgClr', 'counter_area', 'Counter Number Circle BG Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_numbrdClr', 'counter_area', 'Counter Number Circle Border Color', '#FF7617');

addColorPalatOption($wp_customize, 'counter_numClr', 'counter_area', 'Counter Number Color', '#fff');

addColorPalatOption($wp_customize, 'counter_titleClr', 'counter_area', 'Counter Title Color', '#fff');


