<?php 
$wp_customize->add_section(
    'package_area',
    array(
        'title'         => __( 'Packages Section', 'Luzuk' ),
        'panel'   => 'luzuk_premium_home_panel',
    )
);

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

backgroundManager($wp_customize, 'package', 'package_area', $color='#ffffff', get_template_directory_uri().'/images/default-gray.png', 'img');

lzCustomLable($wp_customize, 'luzuk_sec_packagesectionpadding', 'package_area', 'Set Section Padding:');

$wp_customize->add_setting(
    'package_areaTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '6em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'package_areaTpadding',
    array(
        'settings'      => 'package_areaTpadding',
        'section'       => 'package_area',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'luzuk-premium' )
    )
);
$wp_customize->add_setting(
    'package_areaBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '4em', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'package_areaBpadding',
    array(
        'settings'      => 'package_areaBpadding',
        'section'       => 'package_area',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'luzuk-premium' )
    )
);


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

$wp_customize->add_setting(
    'packages_maintitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '<span>Tour</span> Packages', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'packages_maintitle',
    array(
        'settings'      => 'packages_maintitle',
        'section'       => 'package_area', 
        'type'          => 'text',
        'label'         => __( 'Section Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'packagearattle', 'package_area', 'Section Heading Color ', '#131313');

addColorPalatOption($wp_customize, 'packagearahedhg', 'package_area', 'Heading Highlight Color ', '#131313');

$wp_customize->add_setting(
    'packages_subtitle',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industrys.', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'packages_subtitle',
    array(
        'settings'      => 'packages_subtitle',
        'section'       => 'package_area', 
        'type'          => 'textarea',
        'label'         => __( 'Section Sub Heading', 'Luzuk' )
    )
);

addColorPalatOption($wp_customize, 'packageareasubtitle', 'package_area', 'Sub Heading Color ', '#979797');


$wp_customize->add_setting('package_area_lbl2', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'package_area_lbl2',
        array(
            'settings'      => 'package_area_lbl2',
            'section'       => 'package_area',
            'label'         => __( 'Note2:', 'Luzuk' ),  
            'description'   => __( 'Use Shortcode [PACKAGES] to show all packages in a page & images use same height', 'Luzuk' ),
        )
    )
);


$wp_customize->add_setting('package_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'package_npp_heading',
        array(
            'settings'      => 'package_npp_heading',
            'section'       => 'package_area',
            'label'         => __( 'Number of package to show', 'Luzuk' ),
        )
    )
);    
$wp_customize->add_setting('package_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'package_npp_count',
    array(
        'settings'      => 'package_npp_count',
        'section'       => 'package_area',
        'type'          => 'select',
        'label'         => __( 'Number of package to show', 'Luzuk' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

$packageSingleChoice[] = 'Select';
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'package_heading'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'package_heading'.$i,
            array(
                'settings'      => 'package_heading'.$i,
                'section'       => 'package_area',
                'label'         => __( 'package Page ', 'Luzuk' ).$i,
            )
        )
    );
    if(is_array($packageSingleChoice)){
        $wp_customize->add_setting(
            'package_page'.$i,
            array(
                'sanitize_callback' => 'absint'
            )
        );
        $wp_customize->add_control(
            'package_page'.$i,
            array(
                'settings'      => 'package_page'.$i,
                'section'       => 'package_area',
                'type'=> 'select',
                'label'         => __( 'Select a package Page', 'Luzuk' ),
                'choices' => $packageSingleChoice,
            )
        );

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

lzCustomLable($wp_customize, 'packagecolor', 'package_area', 'Section Colors');

addColorPalatOption($wp_customize, 'packagesecimghv', 'package_area', 'Section Images Overlay Color ', '#ff1944');

addColorPalatOption($wp_customize, 'packagesecttle', 'package_area', 'Section Package Name Color ', '#131313');

addColorPalatOption($wp_customize, 'packagesecttlehv', 'package_area', 'Section Package Name Hover Color ', '#ff1944');

addColorPalatOption($wp_customize, 'packagesecloicn', 'package_area', 'Section Location Icon Color ', '#ff1944');

addColorPalatOption($wp_customize, 'packagesecicn', 'package_area', 'Section Location Text Color ', '#979797');

addColorPalatOption($wp_customize, 'packagesectxt', 'package_area', 'Section Text Color ', '#979797');

addColorPalatOption($wp_customize, 'packagesecdyprce', 'package_area', 'Section Days & Price Color ', '#979797');

addColorPalatOption($wp_customize, 'packagesecdyprcehg', 'package_area', 'Section Days & Price Highlight Color ', '#131313');

addColorPalatOption($wp_customize, 'packagesecdyprcehghv', 'package_area', 'Section Days & Price Highlight Hover Color ', '#ff1944');




