<?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='#ffffff', get_template_directory_uri().'/images/default-gray.png', 'img');

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

$wp_customize->add_setting(
    'project_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '8em', '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'           => __( '4em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'project_areaBpadding',
    array(
        'settings'      => 'project_areaBpadding',
        'section'       => 'project_area',
        'type'          => 'text',
        'label'         => __( 'Bottom', 'luzuk-premium' )
    )
);


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




$wp_customize->add_setting(
    'project_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'OUR LATEST PROJECTS', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'project_maintitle',
    array(
        'settings'      => 'project_maintitle',
        'section'       => 'project_area', 
        'type'          => 'text',
        'label'         => __( 'Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'projectarattle', 'project_area', 'Heading Color ', '#111944');

$wp_customize->add_setting(
    'project_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'OUR WORK', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'project_subtitle',
    array(
        'settings'      => 'project_subtitle',
        'section'       => 'project_area', 
        'type'          => 'text',
        'label'         => __( 'Sub Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'projectareasubtitle', 'project_area', 'Sub Heading Color ', '#F4B504');

$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'         => __( 'Note2:', 'Luzuk' ),  
            'description'   => __( 'Use Shortcode [project] to show all project in a page & images use same height', '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 project to show', 'Luzuk' ),
        )
    )
);    
$wp_customize->add_setting('project_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 3));
$wp_customize->add_control(
    'project_npp_count',
    array(
        'settings'      => 'project_npp_count',
        'section'       => 'project_area',
        'type'          => 'select',
        'label'         => __( 'Number Of Project To Show', 'Luzuk' ),
        'choices'=>array(1,2,3,4,5,6,7,8)
    )
);


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

    }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 project from "project menu" and then select project to show information. ', 'Luzuk' ),
                )
            )
        );
    }
 
}

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

addColorPalatOption($wp_customize, 'project_imgoly', 'project_area', ' Image Overlay Color ', '#111944');

// addColorPalatOption($wp_customize, 'project_imgbrd', 'project_area', ' Image Hover Border Color ', '#F4B504');

addColorPalatOption($wp_customize, 'projectecttle', 'project_area', ' Title Color ', '#111944');
