import * as React from "react"
import { cn } from "@/registry/lib/utils"
// @use-when a multi-line text field.
function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
return (
<textarea
data-slot="textarea"
className={cn(
"placeholder:text-subtle-foreground selection:bg-accent selection:text-accent-foreground border-border block w-full min-w-0 min-h-16 rounded-action border bg-input-bg backdrop-blur-sm px-3 py-2 text-base md:text-sm shadow-xs transition-[color,box-shadow,border-color] duration-small ease-small outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-70",
"focus-visible:border-accent focus-visible:ring-ring-accent focus-visible:ring-1",
"aria-invalid:ring-ring-destructive aria-invalid:border-destructive",
// Read-only: flat on the muted fill, full opacity, still focusable.
"[&[readonly]]:bg-muted [&[readonly]]:shadow-none",
className
)}
{...props}
/>
)
}
export { Textarea }