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


backgroundManager($wp_customize, 'team', 'lz_fitness_team_section', $color='#eef1f2');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_team_upperColor', 'lz_fitness_team_section', 'Upper Background color', '#7854c0');

$wp_customize->add_setting(
	'lz_fitness_team_title_subtitle_heading',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
	)
);
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'lz_fitness_team_title_subtitle_heading',
		array(
			'settings'      => 'lz_fitness_team_title_subtitle_heading',
			'section'       => 'lz_fitness_team_section',
			'label'         => __( 'Section Title & Sub Title', 'gurukul' ), 
		)
	)
);
$wp_customize->add_setting(
	'lz_fitness_team_sub_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Lorem Ipsum is simply dummy text of the printing', 'gurukul' )
	)
);
$wp_customize->add_control(
	'lz_fitness_team_sub_title',
	array(
		'settings'      => 'lz_fitness_team_sub_title',
		'section'       => 'lz_fitness_team_section',
		'type'          => 'textarea',
		'label'         => __( 'Title', 'gurukul' )
	)
);

$wp_customize->add_setting(
	'lz_fitness_team_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'OUR TEAM', 'gurukul' )
	)
);
$wp_customize->add_control(
	'lz_fitness_team_title',
	array(
		'settings'      => 'lz_fitness_team_title',
		'section'       => 'lz_fitness_team_section',
		'type'          => 'text',
		'label'         => __( 'Sub Title', 'gurukul' )
	)
);

$wp_customize->add_setting('lz_fitness_team_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
	new lz_fitness_Customize_Heading(
		$wp_customize,
		'lz_fitness_team_npp_heading',
		array(
			'settings'      => 'lz_fitness_team_npp_heading',
			'section'       => 'lz_fitness_team_section',
			'label'         => __( 'Number Of team to show', 'gurukul' ),
		)
	)
);    
$wp_customize->add_setting('lz_fitness_team_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 3));
$wp_customize->add_control(
	'lz_fitness_team_npp_count',
	array(
		'settings'      => 'lz_fitness_team_npp_count',
		'section'       => 'lz_fitness_team_section',
		'type'          => 'select',
		'label'         => __( 'Number of team members to show', 'gurukul' ),
		'choices'=>array(1,2,3,4,5,6,7,8)
	)
);

// TEAM PAGES
for( $i = 1; $i <= 8; $i++ ){
	$wp_customize->add_setting(
		'lz_fitness_team_heading'.$i,
		array(
			'sanitize_callback' => 'lz_fitness_sanitize_text'
		)
	);
	$wp_customize->add_control(
		new lz_fitness_Customize_Heading(
			$wp_customize,
			'lz_fitness_team_heading'.$i,
			array(
				'settings'      => 'lz_fitness_team_heading'.$i,
				'section'       => 'lz_fitness_team_section',
				'label'         => __( 'Team Member ', 'gurukul' ).$i,
			)
		)
	);
	if(is_array($lzFitnessTeamsSingleChoice)){
		$wp_customize->add_setting(
			'lz_fitness_team_page'.$i,
			array(
				'sanitize_callback' => 'absint'
			)
		);
		$wp_customize->add_control(
			'lz_fitness_team_page'.$i,
			array(
				'settings'      => 'lz_fitness_team_page'.$i,
				'section'       => 'lz_fitness_team_section',
				'type'=> 'select',
				'label'         => __( 'Select a Trainer', 'gurukul' ),
				'choices' => $lzFitnessTeamsSingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('lz_fitness_team_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
		$wp_customize->add_control(
			new lz_fitness_Info_Text( 
				$wp_customize,
				'lz_fitness_team_section_lbl'.$i,
				array(
					'settings'		=> 'lz_fitness_team_section_lbl'.$i,
					'section'		=> 'lz_fitness_team_section',
					'label'			=> __( 'Note:', 'gurukul' ),	
					'description'	=> __( '<strong>Changes will not reflect unless you select the team member.</strong> <br/>Please add the team from "Teams menu" and then select team member to show information.', 'gurukul' ),
				)
			)
		);
	}
}
// TEAM SECTION END HERE 

// Text color
addColorPalatOption($wp_customize, 'lz_fitness_team_HeadingColor', 'lz_fitness_team_section', 'Heading color', '#ffffff');

// Heading color
addColorPalatOption($wp_customize, 'lz_fitness_team_Sub_HeadingColor', 'lz_fitness_team_section', 'Sub Heading color', '#ffffff');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_team_MemberTextColor', 'lz_fitness_team_section', 'Member Name Text color', '#ffffff');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_team_DesigntaionTextColor', 'lz_fitness_team_section', ' Designtaion Text color', '#ffffff');
// Text color
addColorPalatOption($wp_customize, 'lz_fitness_team_IconColor', 'lz_fitness_team_section', 'Icon color', '#ffffff');
