/** * BoundsValidator Component * * Renders error/warning messages with smooth transitions */ import { Alert, AlertDescription } from "@/components/ui/alert"; import { MachineStatus } from "../../types/machine"; import { canUploadPattern, getMachineStateCategory, } from "../../utils/machineStateHelpers"; import type { PesPatternData } from "../../formats/import/pesImporter"; interface BoundsValidatorProps { pesData: PesPatternData | null; machineStatus: MachineStatus; boundsError: string | null; } export function BoundsValidator({ pesData, machineStatus, boundsError, }: BoundsValidatorProps) { const hasError = pesData && (boundsError || !canUploadPattern(machineStatus)); return (