/// How a single routine step is satisfied. enum StepMode { /// A clock runs down and the step advances on its own. Timed, /// A rep target per set; the set ends when you say it does. Reps, /// A task. Ticked, not timed — the clock still records how long it took. Check, } String stepModeLabel(StepMode value) { switch (value) { case StepMode.Timed: return "Timed"; case StepMode.Reps: return "Reps"; case StepMode.Check: return "Tick"; } } StepMode getStepMode(String? name) { for (StepMode value in StepMode.values) { if (value.name == name) { return value; } } return StepMode.Timed; }