"use client";import{useFocusRing as A}from"@react-aria/focus";import{useHover as c}from"@react-aria/interactions";import{useId as E}from'../../hooks/use-id.js';import{useSlot as P}from'../../hooks/use-slot.js';import{useDisabled as R}from'../../internal/disabled.js';import{useProvidedId as g}from'../../internal/id.js';import{forwardRefWithAs as v,mergeProps as _,useRender as D}from'../../utils/render.js';import{useDescribedBy as F}from'../description/description.js';import{useLabelledBy as h}from'../label/label.js';let L="textarea";function H(a,t){let s=E(),l=g(),d=R(),{id:i=l||`headlessui-textarea-${s}`,disabled:e=d||!1,autoFocus:r=!1,invalid:o=!1,...p}=a,n=h(),T=F(),{isFocused:f,focusProps:m}=A({autoFocus:r}),{isHovered:u,hoverProps:b}=c({isDisabled:e}),y=_({ref:t,id:i,"aria-labelledby":n,"aria-describedby":T,"aria-invalid":o?"true":void 0,disabled:e||void 0,autoFocus:r},m,b),x=P({disabled:e,invalid:o,hover:u,focus:f,autofocus:r});return D()({ourProps:y,theirProps:p,slot:x,defaultTag:L,name:"Textarea"})}let M=v(H);export{M as Textarea};
