<?php  
/**
 * Createing an about us pannel for customizer
 *
 */
// TEAM SECTION START HERE 
/*============TEAM SECTION PANEL============*/
$wp_customize->add_section(
	'lz_fitness_ct_team_section',
	array(
		'title'         => __( 'Team Member Section', 'lz-fitness-premium' ),
		'panel'   => 'lz_fitness_premium_home_panel',
	)
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
	'lz_fitness_ct_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_ct_team_section_disable',
		array(
			'settings'      => 'lz_fitness_ct_team_section_disable',
			'section'       => 'lz_fitness_ct_team_section',
			'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
			'on_off_label'  => array(
				'on' => __( 'Yes', 'lz-fitness-premium' ),
				'off' => __( 'No', 'lz-fitness-premium' )
			)   
		)
	)
);

backgroundManager($wp_customize, 'team', 'lz_fitness_ct_team_section', $color='#fff');

lzCustomLable($wp_customize, 'lz_fitness_sec_teamsectionpadding', 'lz_fitness_ct_team_section', 'Set Padding For Team Section:');

$wp_customize->add_setting(
    'sec_teamsectionTpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '7em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_teamsectionTpadding',
    array(
        'settings'      => 'sec_teamsectionTpadding',
        'section'       => 'lz_fitness_ct_team_section',
        'type'          => 'text',
        'label'         => __( 'Team Member Section Top Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_teamsectionBpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '7em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_teamsectionBpadding',
    array(
        'settings'      => 'sec_teamsectionBpadding',
        'section'       => 'lz_fitness_ct_team_section',
        'type'          => 'text',
        'label'         => __( 'Team Member Section Bottom Padding', 'lz-fitness-premium' )
    )
);

$wp_customize->add_setting(
    'sec_teamsectionLpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_teamsectionLpadding',
    array(
        'settings'      => 'sec_teamsectionLpadding',
        'section'       => 'lz_fitness_ct_team_section',
        'type'          => 'text',
        'label'         => __( 'Team Member Section Left Padding', 'lz-fitness-premium' )
    )
);
$wp_customize->add_setting(
    'sec_teamsectionRpadding',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default'           => __( '0em', 'lz-fitness-premium' )
    )
);
$wp_customize->add_control(
    'sec_teamsectionRpadding',
    array(
        'settings'      => 'sec_teamsectionRpadding',
        'section'       => 'lz_fitness_ct_team_section',
        'type'          => 'text',
        'label'         => __( 'Team Member Section Right Padding', 'lz-fitness-premium' )
    )
);

$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_ct_team_section',
			'label'         => __( 'Section Title & Sub Title', 'lz-fitness-premium' ),
		)
	)
);
$wp_customize->add_setting(
	'lz_fitness_team_subtitle',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Pet Care Staff', 'lz-fitness-premium' )
	)
);
$wp_customize->add_control(
	'lz_fitness_team_subtitle',
	array(
		'settings'      => 'lz_fitness_team_subtitle',
		'section'       => 'lz_fitness_ct_team_section',
		'type'          => 'text',
		'label'         => __( 'Section Sub Title', 'lz-fitness-premium' )
	)
);
addColorPalatOption($wp_customize, 'lz_fitness_team_sectionsubtitleColor', 'lz_fitness_ct_team_section', 'Select Section Sub Title color','#68a0f9');
addColorPalatOption($wp_customize, 'lz_fitness_team_sectionsubtitleborderColor', 'lz_fitness_ct_team_section', 'Select Section Sub Title Border color','#68a0f9');

$wp_customize->add_setting(
	'lz_fitness_team_title',
	array(
		'sanitize_callback' => 'lz_fitness_sanitize_text',
		'default'           => __( 'Meet Our Teem Members', 'lz-fitness-premium' )
	)
);
$wp_customize->add_control(
	'lz_fitness_team_title',
	array(
		'settings'      => 'lz_fitness_team_title',
		'section'       => 'lz_fitness_ct_team_section',
		'type'          => 'text',
		'label'         => __( 'Section Title', 'lz-fitness-premium' )
	)
);
addColorPalatOption($wp_customize, 'lz_fitness_team_sectiontitleColor', 'lz_fitness_ct_team_section', 'Select Section Title color','#3b3634');


/*for note text*/
$wp_customize->add_setting('lz_team_sectionnoteser_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Info_Text( 
        $wp_customize,
        'lz_team_sectionnoteser_lbl',
        array(
            'settings'      => 'lz_team_sectionnoteser_lbl',
            'section'       => 'lz_fitness_ct_team_section',
            'label'         => __( 'Note1:', 'worldwide' ),    
            'description'   => __( 'Just place the shortcode "[TEAMLIST]" in your page to Show all team members in a page', 'worldwide' ),
        )
    )
);

$wp_customize->add_setting('lz_fitness_teammembername_section_lbl', array('sanitize_callback'=>'lz_fitness_sanitize_text'));
$wp_customize->add_control(
	new lz_fitness_Info_Text( 
		$wp_customize,
		'lz_fitness_teammembername_section_lbl',
		array(
			'settings'		=> 'lz_fitness_teammembername_section_lbl',
			'section'		=> 'lz_fitness_ct_team_section',
			'label'			=> __( 'Note2:', 'expertmovers' ),	
			'description'	=> __( 'Add team member images of equal height', 'expertmovers' ),
		)
	)
);
/*for note text*/

$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_ct_team_section',
			'label'         => __( 'Number Of team members to show', 'lz-fitness-premium' ),
		)
	)
);    
// $wp_customize->add_setting('lz_fitness_team_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 15));
// $wp_customize->add_control(
// 	'lz_fitness_team_npp_count',
// 	array(
// 		'settings'      => 'lz_fitness_team_npp_count',
// 		'section'       => 'lz_fitness_ct_team_section',
// 		'type'          => 'select',
// 		'label'         => __( 'Number of team members to show', 'lz-fitness-premium' ),
// 		'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)
// 	)
// );

// TEAM PAGES
for( $i = 1; $i <= 16; $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_ct_team_section',
				'label'         => __( 'Team Member ', 'lz-fitness-premium' ).$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_ct_team_section',
				'type'=> 'select',
				'label'         => __( 'Select a Team Member', 'lz-fitness-premium' ),
				'choices' => $lzFitnessTeamsSingleChoice,
			)
		);
	}else{
		$wp_customize->add_setting('lz_fitness_ct_team_section_lbl'.$i, array('sanitize_callback'=>'lz_fitness_sanitize_text'));
		$wp_customize->add_control(
			new lz_fitness_Info_Text( 
				$wp_customize,
				'lz_fitness_ct_team_section_lbl'.$i,
				array(
					'settings'		=> 'lz_fitness_ct_team_section_lbl'.$i,
					'section'		=> 'lz_fitness_ct_team_section',
					'label'			=> __( 'Note:', 'lz-fitness-premium' ),	
					'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.', 'lz-fitness-premium' ),
				)
			)
		);
	}
}


addColorPalatOption($wp_customize, 'lz_fitness_team_memberimageoverlayhvrColor', 'lz_fitness_ct_team_section', 'Select Team Member Image Hover Overlay Background color','#ff7c4e');
addColorPalatOption($wp_customize, 'lz_fitness_team_memberimagehvrsocialcColor', 'lz_fitness_ct_team_section', 'Select Team Member Image Hover Social Icon color','#ffffff');
addColorPalatOption($wp_customize, 'lz_fitness_team_memberimagehvrsocialchvrssColor', 'lz_fitness_ct_team_section', 'Select Team Member Image Hover Social Icon Hover color','#ff7c4e');

addColorPalatOption($wp_customize, 'lz_fitness_team_memberimagehvrsocialiconbrsscColor', 'lz_fitness_ct_team_section', 'Select Team Member Image Hover Social Icon Border color','#ffffff');
addColorPalatOption($wp_customize, 'lz_fitness_team_memberimagehvrsocialiconbrsschvrsColor', 'lz_fitness_ct_team_section', 'Select Team Member Image Hover Social Icon Hover Background color','#ffffff');



addColorPalatOption($wp_customize, 'lz_fitness_team_nametxtColor', 'lz_fitness_ct_team_section', 'Select Team Member Name Text color','#3b3634');
addColorPalatOption($wp_customize, 'lz_fitness_team_DesignationtxtColor', 'lz_fitness_ct_team_section', 'Select Team Member Designation Text color','#616e80');
addColorPalatOption($wp_customize, 'lz_fitness_team_BxbgssColor', 'lz_fitness_ct_team_section', 'Select Team Details Box Background color','#ffffff');


addColorPalatOption($wp_customize, 'lz_fitness_team_prevnextbtnColor', 'lz_fitness_ct_team_section', 'Select Prev & Next Button color','#ff7c4e');
addColorPalatOption($wp_customize, 'lz_fitness_team_prevnextbtnhvrsColor', 'lz_fitness_ct_team_section', 'Select Prev & Next Button Hover color','#ffffff');

addColorPalatOption($wp_customize, 'lz_fitness_team_prevnextbtnbrssColor', 'lz_fitness_ct_team_section', 'Select Prev & Next Button Border color','#ff7c4e');
addColorPalatOption($wp_customize, 'lz_fitness_team_prevnextbtnbrsshvrssColor', 'lz_fitness_ct_team_section', 'Select Prev & Next Button hover Background color','#ff7c4e');
