<?php 
/**
 * Createing an about us pannel for customizer
 *
 */
// TEAM SECTION START HERE 
/*============TEAM SECTION PANEL============*/
$wp_customize->add_section(
	'lz_fitness_gallery_section',
	array(
		'title'         => __( 'Gallary Section', 'gurukul' ),
		'panel'   => 'lz_fitness_premium_home_panel',
	)
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
	'lz_fitness_gallery_section_disable',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default' => 'off'
	)
);
$wp_customize->add_control(
	new lz_fitness_Switch_Control(
		$wp_customize,
		'lz_fitness_gallery_section_disable',
		array(
			'settings'      => 'lz_fitness_gallery_section_disable',
			'section'       => 'lz_fitness_gallery_section',
			'label'         => __( 'Disable Section', 'gurukul' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'gurukul' ),
				'off' => __( 'No', 'gurukul' )
			)   
		)
	)
);


backgroundManager($wp_customize, 'gallery', 'lz_fitness_gallery_section', $color='#f6f6f6');

$wp_customize->add_setting(
	'lz_fitness_gallery_title_subtitle_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'lz_fitness_gallery_title_subtitle_heading',
		array(
			'settings'      => 'lz_fitness_gallery_title_subtitle_heading',
			'section'       => 'lz_fitness_gallery_section',
			'label'         => __( 'Section Title & Sub Title', 'gurukul' ),
		)
	)
);
$wp_customize->add_setting(
	'lz_fitness_gallery_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'PHOTO GALLERY', 'gurukul' )
	)
);
$wp_customize->add_control(
	'lz_fitness_gallery_title',
	array(
		'settings'      => 'lz_fitness_gallery_title',
		'section'       => 'lz_fitness_gallery_section',
		'type'          => 'text',
		'label'         => __( 'Title', 'gurukul' )
	)
);
 $wp_customize->add_setting(
 	'lz_fitness_gallery_sub_title',
 	array(
 		'sanitize_callback' => 'lz_fitness_sanitize_text',
 		'default'           => __( 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.', 'gurukul' )
	)
 );
 $wp_customize->add_control(
 	'lz_fitness_gallery_sub_title',
 	array(
 		'settings'      => 'lz_fitness_gallery_sub_title',
 		'section'       => 'lz_fitness_gallery_section',
		'type'          => 'textarea',
		'label'         => __( 'Sub Title', 'gurukul' )
 	)
 );

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_gallery_HeadingColor', 'lz_fitness_gallery_section', 'Heading color', '#ffffff');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_gallery_TextColor', 'lz_fitness_gallery_section', 'Sub Heading color', '#2b2b2b');
// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_gallery_spanBackgroundColor', 'lz_fitness_gallery_section', 'Heading Background color', '#69489d');
  // outline color 
addColorPalatOption($wp_customize, 'lz_fitness_gallery_spanoulineHeadingColor', 'lz_fitness_gallery_section', 'Outline Color', '#69489d');



$wp_customize->add_setting('lz_fitness_gallery_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'lz_fitness_gallery_npp_heading',
		array(
			'settings'      => 'lz_fitness_gallery_npp_heading',
			'section'       => 'lz_fitness_gallery_section',
			'label'         => __( 'Number Of gallary images to show', 'gurukul' ),
		)
	)
);    
$wp_customize->add_setting('lz_fitness_gallery_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 7));
$wp_customize->add_control(
	'lz_fitness_gallery_npp_count',
	array(
		'settings'      => 'lz_fitness_gallery_npp_count',
		'section'       => 'lz_fitness_gallery_section',
		'type'          => 'select',
		'label'         => __( 'Number of gallary images to show', 'gurukul' ),
		'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(
		'lz_fitness_gallery_heading'.$i,
		array(
			'sanitize_callback' => 'lz_fitness_sanitize_text'
		)
	);
	$wp_customize->add_control(
		new lz_fitness_Customize_Heading(
			$wp_customize,
			'lz_fitness_gallery_heading'.$i,
			array(
				'settings'      => 'lz_fitness_gallery_heading'.$i,
				'section'       => 'lz_fitness_gallery_section',
				'label'         => __( ' Image ', 'gurukul' ).$i, 
			)
		)
	);
	if(is_array($lzFitnessGallerySingleChoice)){
		$wp_customize->add_setting(
			'lz_fitness_gallery_page'.$i,
			array(
				'sanitize_callback' => 'absint'
			)
		);
		$wp_customize->add_control(
			'lz_fitness_gallery_page'.$i,
			array(
				'settings'      => 'lz_fitness_gallery_page'.$i,
				'section'       => 'lz_fitness_gallery_section',
				'type'=> 'select',
				'label'         => __( 'Select a Gallary Image', 'gurukul' ),
				'choices' => $lzFitnessGallerySingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('lz_fitness_gallery_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
		$wp_customize->add_control(
			new lz_fitness_Info_Text( 
				$wp_customize,
				'lz_fitness_gallery_section_lbl'.$i,
				array(
					'settings'		=> 'lz_fitness_gallery_section_lbl'.$i,
					'section'		=> 'lz_fitness_gallery_section',
					'label'			=> __( 'Note:', 'gurukul' ),	
					'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.', 'gurukul' ),
				)
			)
		);
	}
}
// TEAM SECTION END HERE 