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