"use client"; import React from "react"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Checkbox } from "@/components/ui/checkbox"; interface FormFieldProps { label: string; name: string; type?: "text" | "email" | "password" | "number" | "tel" | "url" | "textarea" | "select" | "checkbox"; placeholder?: string; value: any; onChange: (value: any) => void; error?: string; required?: boolean; disabled?: boolean; options?: Array<{ value: string | number; label: string }>; helpText?: string; className?: string; min?: number; max?: number; step?: number; rows?: number; } export const FormField: React.FC = ({ label, name, type = "text", placeholder, value, onChange, error, required = false, disabled = false, options = [], helpText, className = "", min, max, step, rows = 3, }) => { const fieldId = `field-${name}`; const hasError = !!error; const renderField = () => { switch (type) { case "textarea": return (