func SelectTeamPrompt(teams []api.TeamResult, label, addLabel string) (int, string, error) {
	names := make([]string, len(teams))
	for i, t := range teams {
		names[i] = t.Body.Name
	}

	if label == "" {
		label = "Select Team"
	}

	if addLabel == "" {
		label = "Create a new team"
	}

	prompt := promptui.SelectWithAdd{
		Label:    label,
		Items:    names,
		AddLabel: addLabel,
		Validate: validateSlug("team"),
	}

	return prompt.Run()
}
// SelectTeamPrompt prompts the user to select a team from a list or enter a
// new name, an optional label can be provided.
SelectTeamPrompt prompts the user to select a team from a list or enter a
new name, an optional label can be provided.
// SelectTeamPrompt prompts the user to select a team from a list or enter a // new name an optional label can be provided .
func SelectTeamPrompt(teams []api.TeamResult, label, addLabel string) (int, string, error) {
	names := make([]string, len(teams))
	for i, t := range teams {
		names[i] = t.Body.Name
	}
	if label == "" {
		label = "Select Team"
	}
	if addLabel == "" {
		label = "Create a new team"
	}
	prompt := promptui.SelectWithAdd{
		Label:    label,
		Items:    names,
		AddLabel: addLabel,
		Validate: validateSlug("team"),
	}
	return prompt.Run()
}
func SelectTeamPrompt ( teams [ ] api . TeamResult , label , addLabel string ) ( int , string , error ) { names := make ( [ ] string , len ( teams ) ) for i , t := range teams { names [ i ] = t . Body . Name } if label == " " { label = " " } if addLabel == " " { label = " " } prompt := promptui . SelectWithAdd { Label : label , Items : names , AddLabel : addLabel , Validate : validateSlug ( " " ) , } return prompt . Run ( ) }
SelectTeamPrompt prompts the user to select a team from a list or enter a
new name, an optional label can be provided.
SelectTeamPrompt prompts the user to select a team from a list or enter a new name an optional label can be provided .