package utils

import "jannex/robot-control-manager/modules/structs"

func GetRobotTypeString(t uint8) string {
	switch t {
	case RobotTypeRex:
		return "rex"
	case RobotTypeYeet:
		return "yeet"
	default:
		return "unknown"
	}
}

func GetRobotStatusString(s uint8) string {
	switch s {
	case RobotStatusIdle:
		return "idle"
	case RobotStatusRunning:
		return "running"
	case RobotStatusConnecting:
		return "connecting"
	case RobotStatusError:
		return "error"
	case RobotStatusOffline:
		return "offline"
	default:
		return "unknown"
	}
}

func GetJobsWaitingNameList(list []structs.JobWaitingName) []string {
	var jobsWaitingNameList []string

	for _, j := range list {
		jobsWaitingNameList = append(jobsWaitingNameList, j.Name)
	}

	return jobsWaitingNameList
}
