<?php 
/**
 * Createing an Gallery pannel for customizer
 *
 */
// Gallery SECTION START HERE 
/*============Gallery SECTION PANEL============*/
$wp_customize->add_section(
	'luzuk_them_gallery_section',
	array(
		'title'         => __( 'Gallery Section', 'Luzuk' ),
		'panel'   => 'luzuk_them_premium_home_panel',
	)
);
// ENABLE/DISABLE Gallery SECTION
$wp_customize->add_setting(
	'luzuk_them_gallery_section_disable',
	array(
		'sanitize_callback' => 'luzuk_them_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new luzuk_them_Switch_Control(
		$wp_customize,
		'luzuk_them_gallery_section_disable',
		array(
			'settings'      => 'luzuk_them_gallery_section_disable',
			'section'       => 'luzuk_them_gallery_section',
			'label'         => __( 'Disable Section', 'Luzuk' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'Luzuk' ),
				'off' => __( 'No', 'Luzuk' )
			)   
		)
	)
);
 




lzCustomLable($wp_customize, 'luzuk_them_sec_gallerysectionpadding', 'luzuk_them_gallery_section', 'Set Padding For Gallery Section:');

$wp_customize->add_setting(
    'sec_gallerysectionTpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '6em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionTpadding',
    array(
        'settings'      => 'sec_gallerysectionTpadding',
        'section'       => 'luzuk_them_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Top Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_gallerysectionBpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '1em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionBpadding',
    array(
        'settings'      => 'sec_gallerysectionBpadding',
        'section'       => 'luzuk_them_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Bottom Padding', 'lz-fitness-premium' )
    )
);

$wp_customize->add_setting(
    'sec_gallerysectionLpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionLpadding',
    array(
        'settings'      => 'sec_gallerysectionLpadding',
        'section'       => 'luzuk_them_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Left Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_gallerysectionRpadding',
    array(
        'sanitize_callback' => 'luzuk_them_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionRpadding',
    array(
        'settings'      => 'sec_gallerysectionRpadding',
        'section'       => 'luzuk_them_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Right Padding', 'lz-fitness-premium' )
    )
);


backgroundManager($wp_customize, 'gallery', 'luzuk_them_gallery_section', $color='#ffffff');

$wp_customize->add_setting(
	'luzuk_them_gallery_title_subtitle_heading',
	array(
		'sanitize_callback' => 'luzuk_them_sanitize_text',
	)
);
$wp_customize->add_control(
	new luzuk_them_Customize_Heading(
		$wp_customize,
		'luzuk_them_gallery_title_subtitle_heading',
		array(
			'settings'      => 'luzuk_them_gallery_title_subtitle_heading',
			'section'       => 'luzuk_them_gallery_section',
			'label'         => __( 'Section Title', 'gurukul' ),
		)
	)
);
$wp_customize->add_setting(
	'luzuk_them_gallery_title',
	array(
		'sanitize_callback' => 'luzuk_them_sanitize_text',
		'default'           => __( 'Photo Gallery', 'gurukul' )
	)
);
$wp_customize->add_control(
	'luzuk_them_gallery_title',
	array(
		'settings'      => 'luzuk_them_gallery_title',
		'section'       => 'luzuk_them_gallery_section',
		'type'          => 'text',
		'label'         => __( 'Title', 'gurukul' )
	)
);

// Heading color
addColorPalatOption($wp_customize, 'sec_gallery_HeadingColor', 'luzuk_them_gallery_section', 'Heading color', '#101010');

// Heading color
addColorPalatOption($wp_customize, 'sec_gallery_HeadingborderColor', 'luzuk_them_gallery_section', 'Heading Border color', '#fb6f58');


$wp_customize->add_setting(
	'luzuk_them_gallery_sub_title',
	array(
		'sanitize_callback' => 'luzuk_them_sanitize_text',
		'default'           => __( 'There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words.', 'lz-fitness-premium', 'Luzuk Premium' )
	)
);
$wp_customize->add_control(
	'luzuk_them_gallery_sub_title',
	array(
		'settings'      => 'luzuk_them_gallery_sub_title',
		'section'       => 'luzuk_them_gallery_section',
		'type'          => 'textarea',
		'label'         => __( 'Section Sub Text', 'Luzuk Premium' )
	)
);

// Heading color
addColorPalatOption($wp_customize, 'sec_gallery_subtextColor', 'luzuk_them_gallery_section', 'Heading Sub Text color', '#5b5b5b');



$wp_customize->add_setting('luzuk_them_gallery_section_lbl', array('sanitize_callback'=>'luzuk_them_sanitize_text'));
$wp_customize->add_control(
	new luzuk_them_Info_Text( 
		$wp_customize,
		'luzuk_them_gallery_section_lbl',
		array(
			'settings'		=> 'luzuk_them_gallery_section_lbl',
			'section'		=> 'luzuk_them_gallery_section',
			'label'			=> __( 'Note:', 'Luzuk' ),	
			'description'	=> __( 'Use Gallery Images Of Equal Height.', 'Luzuk' ),
		)
	)
);



$wp_customize->add_setting('luzuk_them_gallery_npp_heading',array('sanitize_callback' => 'luzuk_them_sanitize_text'));
$wp_customize->add_control(
	new luzuk_them_Customize_Heading(
		$wp_customize,
		'luzuk_them_gallery_npp_heading',
		array(
			'settings'      => 'luzuk_them_gallery_npp_heading',
			'section'       => 'luzuk_them_gallery_section',
			'label'         => __( 'Number Of gallery images to show', 'Luzuk' ),
		)
	)
);    
$wp_customize->add_setting('luzuk_them_gallery_npp_count',array('sanitize_callback' => 'luzuk_them_sanitize_text','default' => 5));
$wp_customize->add_control(
	'luzuk_them_gallery_npp_count',
	array(
		'settings'      => 'luzuk_them_gallery_npp_count',
		'section'       => 'luzuk_them_gallery_section',
		'type'          => 'select',
		'label'         => __( 'Number of gallery images to show', 'Luzuk' ),
		'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
	)
);

// TEAM PAGES
for( $i = 1; $i <= 12; $i++ ){
	$wp_customize->add_setting(
		'luzuk_them_gallery_heading'.$i,
		array(
			'sanitize_callback' => 'luzuk_them_sanitize_text'
		)
	);
	$wp_customize->add_control(
		new luzuk_them_Customize_Heading(
			$wp_customize,
			'luzuk_them_gallery_heading'.$i,
			array(
				'settings'      => 'luzuk_them_gallery_heading'.$i,
				'section'       => 'luzuk_them_gallery_section',
				'label'         => __( 'Gallery Image ', 'Luzuk' ).$i, 
			)
		)
	);
	if(is_array($lzFitnessGallerySingleChoice)){
		$wp_customize->add_setting(
			'luzuk_them_gallery_page'.$i,
			array(
				'sanitize_callback' => 'absint'
			)
		);
		$wp_customize->add_control(
			'luzuk_them_gallery_page'.$i,
			array(
				'settings'      => 'luzuk_them_gallery_page'.$i,
				'section'       => 'luzuk_them_gallery_section',
				'type'=> 'select',
				'label'         => __( 'Select a Gallery Image', 'Luzuk' ),
				'choices' => $lzFitnessGallerySingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('luzuk_them_gallery_section_lbl'.$i, array('sanitize_callback'=>'luzuk_them_sanitize_text'));
		$wp_customize->add_control(
			new luzuk_them_Info_Text( 
				$wp_customize,
				'luzuk_them_gallery_section_lbl'.$i,
				array(
					'settings'		=> 'luzuk_them_gallery_section_lbl'.$i,
					'section'		=> 'luzuk_them_gallery_section',
					'label'			=> __( 'Note:', 'Luzuk' ),	
					'description'	=> __( '<strong>Changes will not reflect unless you select the gallery Image.</strong> <br/>Please add the gallary team from "Gallary menu" and then select gallary Image to show information.', 'Luzuk' ),
				)
			)
		);
	}
}

addColorPalatOption($wp_customize, 'luzuk_them_gallery_imageoverlayhvrbg_color', 'luzuk_them_gallery_section', 'Select Gallery Image Hover Overlay Background color', '#101010');

addColorPalatOption($wp_customize, 'gallery_imageoverlayhvrborder_color', 'luzuk_them_gallery_section', 'Select Gallery Image Hover Overlay Border color', '#ffffff');

addColorPalatOption($wp_customize, 'luzuk_them_gallery_imageoverlayhvrbgIcon_color', 'luzuk_them_gallery_section', 'Select Gallery Image Hover Icon color', '#ffffff');

addColorPalatOption($wp_customize, 'gallery_imageoverlayhvrtitle_color', 'luzuk_them_gallery_section', 'Select Gallery Image Title color', '#ffffff');
