<?php 
$wp_customize->add_section(
    'project_area',
    array(
        'title'         => __( 'Project Section', 'luzuk' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);

$wp_customize->add_setting(
    'project_area_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'project_area_disable',
        array(
            'settings'      => 'project_area_disable',
            'section'       => 'project_area',
            'label'         => __( 'Disable Section', 'luzuk' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk' ),
                'off' => __( 'No', 'luzuk' )
            )   
        )
    )
);

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


lzCustomLable($wp_customize, 'luzuk_sec_projectssectionpadding', 'project_area', 'Section Padding');

$wp_customize->add_setting(
    'project_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '4em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'project_areaTpadding',
    array(
        'settings'      => 'project_areaTpadding',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Top', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'project_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'project_areaBpadding',
    array(
        'settings'      => 'project_areaBpadding',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);

lzCustomLable($wp_customize, 'projectarea_conwidth', 'project_area', 'Section Width ');

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

lzCustomLable($wp_customize, 'projectarea_headingaling', 'project_area', 'Heading Alignment');

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


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

lzCustomLable($wp_customize, 'pjarea_subheadingcase', 'project_area', 'Sub Heading Style');

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

$wp_customize->add_setting(
    'pj_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'case studies' )
    )
);
$wp_customize->add_control(
    'pj_subtitle',
    array(
        'settings'      => 'pj_subtitle',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Sub Heading', 'luzuk-premium' )
    )
);


addColorPalatOption($wp_customize, 'pj_subHeading', 'project_area', 'Sub Heading Color', '#505050');

addColorPalatOption($wp_customize, 'pj_subHeadingbrd', 'project_area', 'Sub Heading Border Color', '#BCBCBC');

lzCustomLable($wp_customize, 'pjarea_headingcase', 'project_area', 'Heading Style');

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


$wp_customize->add_setting(
    'pj_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Our Work in Action', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pj_title',
    array(
        'settings'      => 'pj_title',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Heading ', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'pj_Heading', 'project_area', 'Heading Color', '#000');

$wp_customize->add_setting('project_area_lbl2', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'project_area_lbl2',
        array(
            'settings'      => 'project_area_lbl2',
            'section'       => 'project_area',
            'label'         => __( 'Note :', 'luzuk' ),  
            'description'   => __( 'Use Shortcode [projectS] to show all projects in a page', 'luzuk' ),
        )
    )
);


$wp_customize->add_setting('project_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'project_npp_heading',
        array(
            'settings'      => 'project_npp_heading',
            'section'       => 'project_area',
            'label'         => __( 'Number Of projects To Show', 'luzuk' ),
        )
    )
);    

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


$projectsSingleChoice[] = 'Select';

for( $i = 1; $i <= 6; $i++ ){
    $wp_customize->add_setting(
        'projects_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'projects_heading'.$i,
            array(
                'settings'      => 'projects_heading'.$i,
                'section'       => 'project_area',
                'label'         => __( 'Project Box ', 'luzuk' ).$i,
            )
        )
    );
    if(is_array($projectsSingleChoice)){
        $wp_customize->add_setting(
            'projects_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'projects_page'.$i,
            array(
                'settings'      => 'projects_page'.$i,
                'section'       => 'project_area',
                'type'=> 'select',
                'label'         => __( 'Select A Project Box ', 'luzuk' ),
                'choices' => $projectsSingleChoice,
            )
        );

// $wp_customize->add_setting(
//         'projects_page_icon1'.$i,
//         array(
//             'default'           => 'fa fa-wrench',
//             'sanitize_callback' => 'luzuk_sanitize_text'
//         )
//     );        
//     $wp_customize->add_control(
//         new luzuk_Fontawesome_Icon_Choopj(
//             $wp_customize,
//             'projects_page_icon1'.$i,
//             array(
//                 'settings'      => 'projects_page_icon1'.$i,
//                 'section'       => 'project_area',
//                 'type'          => 'icon',
//                 'label'         => __( 'FontAwesome Icon', 'luzuk' ),
//             )
//         )
//     );



    }else{
        $wp_customize->add_setting('project_area_lbl'.$i, array('sanitize_callback'=>'luzuk_sanitize_text'));
        $wp_customize->add_control(
            new luzuk_Info_Text( 
                $wp_customize,
                'project_area_lbl'.$i,
                array(
                    'settings'      => 'project_area_lbl'.$i,
                    'section'       => 'project_area',
                    'label'         => __( 'Note:', 'luzuk' ),    
                    'description'   => __( '<strong>Changes will not reflect unless you select the project Page.</strong> <br/>Please add the projects from "projects menu" and then select projects to show information.', 'luzuk' ),
                )
            )
        );
    }
}

lzCustomLable($wp_customize, 'luzuk_sec_projectsclr', 'project_area', 'Section Color');



addColorPalatOption($wp_customize, 'projects_secTitleClr', 'project_area', 'Title Color ', '#fff');

addColorPalatOption($wp_customize, 'projects_secTitlehvClr', 'project_area', 'Title Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'pj_sectxtClr', 'project_area', 'Text Color ', '#fff');


lzCustomLable($wp_customize, 'pj_secbtn', 'project_area', 'Section Image Button ');
$wp_customize->add_setting(
    'pj_button',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'View Case Study', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'pj_button',
    array(
        'settings'      => 'pj_button',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Button Text', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'pj_secbtntxtClr', 'project_area', 'Button Text Color ', '#fff');

addColorPalatOption($wp_customize, 'pj_secbtntxthvClr', 'project_area', 'Button Text Hover Color ', '#fff');

addColorPalatOption($wp_customize, 'pj_secbtntxtbrdClr', 'project_area', 'Button Border Color ', '#DBDBDB');

addColorPalatOption($wp_customize, 'pj_secbtntxtbgClr', 'project_area', 'Button Text BG Color ', '#fff');

addColorPalatOption($wp_customize, 'pj_secbtntxtbghvClr', 'project_area', 'Button Text BG Hover Color ', '#0F1C1D');

lzCustomLable($wp_customize, 'pj_starset', 'project_area', 'Projec Maker Image / Text Or Star Display Setting');

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

addColorPalatOption($wp_customize, 'pj_areastrClr', 'project_area', 'Star Color', '#fff');

addColorPalatOption($wp_customize, 'pj_areastractClr', 'project_area', 'Star Active Color', '#FFF27A');

addColorPalatOption($wp_customize, 'pj_areastartxtClr', 'project_area', 'Image Text Color', '#fff');

addColorPalatOption($wp_customize, 'pj_areaimgtxtClr', 'project_area', 'Image Border Color', '#fff');