<?php 
/**
 * Createing an gallery pannel for customizer
 *
 */
// gallery SECTION START HERE 
/*============gallery SECTION PANEL============*/
$wp_customize->add_section(
	'gallery_area',
	array(
		'title'         => __( 'Gallery Section', 'luzuk' ),
		'panel'   => 'luzuk_premium_home_panel',
	)
);
// ENABLE/DISABLE gallery SECTION
$wp_customize->add_setting(
	'gallery_area_disable',
	array(
		'sanitize_callback' => 'luzuk_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new luzuk_Switch_Control(
		$wp_customize,
		'gallery_area_disable',
		array(
			'settings'      => 'gallery_area_disable',
			'section'       => 'gallery_area',
			'label'         => __( 'Disable Section', 'luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'luzuk' ),
				'off' => __( 'No', 'luzuk' )
			)   
		)
	)
);


backgroundManager($wp_customize, 'gallery', 'gallery_area', $color='#fff9f9', get_template_directory_uri().'/images/default.png', 'img');

lzCustomLable($wp_customize, 'gallery_page_wave', 'gallery_area', 'Section Wave');

addColorPalatOption($wp_customize, 'galleryarea_waveclr', 'gallery_area', 'Section Top Wave Color ', '#fff');

lzCustomLable($wp_customize, 'gallery_padding_lbl', 'gallery_area', 'Set Padding For Section:');

$wp_customize->add_setting(
    'sec_gallerysectionTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '3em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionTpadding',
    array(
        'settings'      => 'sec_gallerysectionTpadding',
        'section'       => 'gallery_area',
        'type'          => 'text',
        'label'         => __( 'Top Padding', 'Luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_gallerysectionBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'Luzuk' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionBpadding',
    array(
        'settings'      => 'sec_gallerysectionBpadding',
        'section'       => 'gallery_area',
        'type'          => 'text',
        'label'         => __( 'Bottom Padding', 'Luzuk' )
    )
);


$wp_customize->add_setting(
    'gallery_title_subtitle_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'gallery_title_subtitle_heading',
        array(
            'settings'      => 'gallery_title_subtitle_heading',
            'section'       => 'gallery_area',
            'label'         => __( 'Section Title', 'luzuk-premium' ),
        )
    )
);
   
$wp_customize->add_setting(
        'luzuk_gallery_title',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Gallery & Portfolio', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'luzuk_gallery_title',
        array(
            'settings'      => 'luzuk_gallery_title',
            'section'       => 'gallery_area',
            'type'          => 'text',
            'label'         => __( 'Section Heading', 'Luzuk' )
        )
    );

addColorPalatOption($wp_customize, 'galleryarea_sectitle_color', 'gallery_area', 'Section Heading Color ', '#2e3d62');

$wp_customize->add_setting('gallery_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'gallery_npp_heading',
        array(
            'settings'      => 'gallery_npp_heading',
            'section'       => 'gallery_area',
            'label'         => __( 'Number Of Gallery Plans', 'luzuk-premium' ),
        )
    )
); 

lzCustomLable($wp_customize, 'gallery_page_icon', 'gallery_area', 'Recommended Image Size: 365X400px ');

$wp_customize->add_setting('gallery_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 5));
$wp_customize->add_control(
    'gallery_npp_count',
    array(
        'settings'      => 'gallery_npp_count',
        'section'       => 'gallery_area',
        'type'          => 'select',
        'label'         => __( 'Number of plan to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);
// GALLERY PAGES
$luzukGallerySingleChoice[] = 'select';
for( $i = 1; $i <= 12; $i++ ){
	$wp_customize->add_setting(
		'gallery_heading'.$i,
		array(
			'sanitize_callback' => 'luzuk_sanitize_text'
		)
	);
	$wp_customize->add_control(
		new luzuk_Customize_Heading(
			$wp_customize,
			'gallery_heading'.$i,
			array(
				'settings'      => 'gallery_heading'.$i,
				'section'       => 'gallery_area',
				'label'         => __( 'Gallery Image ', 'luzuk' ).$i, 
			)
		)
	);
	
	if(is_array($luzukGallerySingleChoice)){
		$wp_customize->add_setting(
			'gallery_page'.$i,
			array(
				'sanitize_callback' => 'absint'
			)
		);
		$wp_customize->add_control(
			'gallery_page'.$i,
			array(
				'settings'      => 'gallery_page'.$i,
				'section'       => 'gallery_area',
				'type'=> 'select',
				'label'         => __( 'Select a Gallery Image', 'luzuk' ),
				'choices' => $luzukGallerySingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('gallery_area_lbl'.$i, array('sanitize_callback'=>'luzuk_sanitize_text'));
		$wp_customize->add_control(
			new luzuk_Info_Text( 
				$wp_customize,
				'gallery_area_lbl'.$i,
				array(
					'settings'		=> 'gallery_area_lbl'.$i,
					'section'		=> 'gallery_area',
					'label'			=> __( 'Note:', 'luzuk' ),	
					'description'	=> __( '<strong>Changes will not reflect unless you select the gallery Image.</strong> <br/>Please add the gallery team from "Gallery menu" and then select gallery Image to show information.', 'luzuk' ),
				)
			)
		);
	}
}

lzCustomLable($wp_customize, 'gallery_imgbutton', 'gallery_area', 'Section Color ');

addColorPalatOption($wp_customize, 'gall_imgbtnicn_clr', 'gallery_area', 'Section Image Hover Icon Color ', '#fd8455');
addColorPalatOption($wp_customize, 'gall_imghv_clr', 'gallery_area', 'Section Image Hover Color ', '#000');
addColorPalatOption($wp_customize, 'gall_movbx_clr', 'gallery_area', 'Section Movie Box Background Hover Color ', '#fff');
addColorPalatOption($wp_customize, 'gall_titl_clr', 'gallery_area', 'Section Movie Title Color ', '#000');
addColorPalatOption($wp_customize, 'gall_Categres_clr', 'gallery_area', 'Section Movie Categories Color ', '#ccc');


lzCustomLable($wp_customize, 'glry_tpbutton', 'gallery_area', 'Button For Section');
// Top button
 $wp_customize->add_setting( 'glry_button1_display' , array( 'default' => true, 'transport' => 'refresh', ) ); $wp_customize->add_control( 'glry_button1_display', array( 'label' => 'Section Button Display', 'section' => 'gallery_area', 'settings' => 'glry_button1_display', 'type' => 'radio', 'choices' => array( 'show' => 'Show Button', 'hide' => 'Hide Button', ), ) );

$wp_customize->add_setting(
        'glry_button1',
        array(
            'sanitize_callback' => 'luzuk_sanitize_text',
            'default'           => __( 'Explore All', 'Luzuk' )
        )
    );
    $wp_customize->add_control(
        'glry_button1',
        array(
            'settings'      => 'glry_button1',
            'section'       => 'gallery_area',
            'type'          => 'text',
            'label'         => __( 'Add Button Text Here', 'Luzuk' )
        )
    );
$wp_customize->add_setting('glry_link',   array('default'=> 'add Button link here', 'sanitize_callback' => 'esc_url_raw'));
$wp_customize->add_control('glry_link',
    array(
        'settings'      => 'glry_link',
        'section'       => 'gallery_area',
        'type'          => 'url',
        'label'         => __( 'Add Link For Button:', 'Luzuk' )
    )
);    

 addColorPalatOption($wp_customize, 'gallepg_btnbgClr', 'gallery_area', 'Section Button Background Color ', '#fd8455');

addColorPalatOption($wp_customize, 'gallepg_btnbghvClr', 'gallery_area', 'Section Button Background Hover Color ', '#2e3d62');

addColorPalatOption($wp_customize, 'gallepg_btntxtClr', 'gallery_area', 'Section Button Text & Icon Color ', '#fff');

addColorPalatOption($wp_customize, 'gallepg_btntxthvClr', 'gallery_area', 'Section Button Text & Icon Hover Color ', '#fff');