<?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'         => __( 'Counter 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'           => __( '2em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'countersection_bottompadding',
    array(
        'settings'      => 'countersection_bottompadding',
        'section'       => 'counter_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);

lzCustomLable($wp_customize, 'countersection_img', 'counter_area', ' Section Image');

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

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

// right side
lzCustomLable($wp_customize, 'countersection_pipe', 'counter_area', ' Section Pipe');

addColorPalatOption($wp_customize, 'counter_pipeclr', 'counter_area', 'Section Pipe Color', '#D9D9D9');

addColorPalatOption($wp_customize, 'counter_piperingclr', 'counter_area', 'Section Pipe Ring Color', '#BCBCBC');

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

$wp_customize->add_setting(
    'counter_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Count Visitors, Boost', 'luzuk' )
    )
);
$wp_customize->add_control(
    'counter_maintitle',
    array(
        'settings'      => 'counter_maintitle',
        'section'       => 'counter_area', 
        'type'          => 'text',
        'label'         => __( 'Section Heading ', 'luzuk' )
    )
);

addColorPalatOption($wp_customize, 'counter_HeadingClr', 'counter_area', 'Section Heading Color ', '#111944');

$wp_customize->add_setting(
    'counter_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Success Now', 'luzuk' )
    )
);
$wp_customize->add_control(
    'counter_subtitle',
    array(
        'settings'      => 'counter_subtitle',
        'section'       => 'counter_area', 
        'type'          => 'text',
        'label'         => __( 'Section Sub Heading ', 'luzuk' )
    )
);

addColorPalatOption($wp_customize, 'counter_sHeadingClr', 'counter_area', 'Section Sub Heading Color ', '#F4B504');

$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 Box', 'Luzuk Premium' ),
        )
    )
);    
$wp_customize->add_setting('counter_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'counter_npp_count',
    array(
        'settings'      => 'counter_npp_count',
        'section'       => 'counter_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Counter To Show', 'Luzuk Premium' ),
        'choices'=>array(1,2,3,4)
    )
);

//FEATURED PAGES
for( $i = 1; $i <= 4; $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-file-text-o',
            '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='1316+');

lzAddElement($wp_customize, 'counter_page_title'.$i, 'counter_area', $type = 'text', $label="Counter Title", $callback ='luzuk_sanitize_text', $default='PROJECT DONE');
    
}

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

lzCustomLable($wp_customize, 'counter_sec1&4color', 'counter_area', ' Section Contain Box 1st & 4th Box Color');

addColorPalatOption($wp_customize, 'counter_conbxClr', 'counter_area', 'Contain Box Color ', '#111944');

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

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

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


lzCustomLable($wp_customize, 'counter_sec2&3color', 'counter_area', ' Section Contain Box 2nd & 3rd Box Color');

addColorPalatOption($wp_customize, 'counter_conbx2Clr', 'counter_area', 'Contain Box Color ', '#F4B504');

addColorPalatOption($wp_customize, 'counter_icn2Clr', 'counter_area', 'Icon Color', '#111944');

addColorPalatOption($wp_customize, 'counter_num2Clr', 'counter_area', 'Number Color', '#111944');

addColorPalatOption($wp_customize, 'counter_title2Clr', 'counter_area', 'Title Color', '#111944');