"use client"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Button } from "@/components/ui/button"; import { UseFormReturn, FieldValues } from "react-hook-form"; import { Loader2 } from "lucide-react"; interface AnalyzeFormProps { form: UseFormReturn; onSubmit: () => Promise; isLoading: boolean; isDisabled: boolean; } export function AnalyzeForm({ form, onSubmit, isLoading, isDisabled, }: AnalyzeFormProps) { const { register, formState } = form; return (
{formState.errors.material && (

{formState.errors.material.message as string}

)}
{formState.errors.tolerance && (

{formState.errors.tolerance.message as string}

)}
); }