import { useId, type TextareaHTMLAttributes } from "react";
import { cn } from "../../lib/cn";
import { fieldNote, PrefixFieldShell, type FieldMeta } from "./shared";
export type TextAreaProps = TextareaHTMLAttributes & FieldMeta;
export function TextArea({
className,
error,
hint,
id,
label,
prefixIcon,
suffixIcon,
...props
}: TextAreaProps) {
const generatedId = useId();
const fieldId = id ?? generatedId;
const hintId = hint ? `${fieldId}-hint` : undefined;
const errorId = error ? `${fieldId}-error` : undefined;
return (
);
}