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