<?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'         => __( 'Gallery 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='#ffffff');

lzCustomLable($wp_customize, 'lz_fitness_sec_gallerysectionpadding', 'lz_fitness_gallery_section', 'Set Padding For Gallery Section:');

$wp_customize->add_setting(
    'sec_gallerysectionTpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '3px', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionTpadding',
    array(
        'settings'      => 'sec_gallerysectionTpadding',
        'section'       => 'lz_fitness_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Top Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_gallerysectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '3px', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_gallerysectionBpadding',
    array(
        'settings'      => 'sec_gallerysectionBpadding',
        'section'       => 'lz_fitness_gallery_section',
        'type'          => 'text',
        'label'         => __( 'Gallery Section Bottom Padding', 'lz-fitness-premium' )
    )
);

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


$wp_customize->add_setting('lz_fitness_gallery_section_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
	new lz_fitness_Info_Text( 
		$wp_customize,
		'lz_fitness_gallery_section_lbl',
		array(
			'settings'		=> 'lz_fitness_gallery_section_lbl',
			'section'		=> 'lz_fitness_gallery_section',
			'label'			=> __( 'Note:', 'InsideTours' ),	
			'description'	=> __( 'Use Gallery Images Of Equal Height.', 'InsideTours' ),
		)
	)
);



$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 gallery images to show', 'gurukul' ),
		)
	)
);    
$wp_customize->add_setting('lz_fitness_gallery_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 3));
$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 gallery 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'         => __( 'Gallery 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 Gallery 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' ),
				)
			)
		);
	}
}

addColorPalatOption($wp_customize, 'lz_fitness_gallery_imageoverlayhvrbg_color', 'lz_fitness_gallery_section', 'Select Gallery Image Hover Overlay Background Color', '#ff7c4e');

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