import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{ct as n,et as r,x as i}from"./Tooltip.bbzhtE2V.js";import{t as a}from"./useFocusable.IPfYJBxF.js";import{t as o}from"./usePress.Z-7zirtr.js";import{n as s}from"./SharedElementTransition.Cz1rpH2Z.js";function c(e,t){let{elementType:r=`button`,isDisabled:s,onPress:c,onPressStart:l,onPressEnd:u,onPressUp:d,onPressChange:f,preventFocusOnPress:p,allowFocusWhenDisabled:m,onClick:h,href:g,target:_,rel:v,type:y=`button`}=e,b;b=r===`button`?{type:y,disabled:s,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:r===`a`&&!s?g:void 0,target:r===`a`?_:void 0,type:r===`input`?y:void 0,disabled:r===`input`?s:void 0,"aria-disabled":!s||r===`input`?void 0:s,rel:r===`a`?v:void 0};let{pressProps:x,isPressed:S}=o({onPressStart:l,onPressEnd:u,onPressChange:f,onPress:c,onPressUp:d,onClick:h,isDisabled:s,preventFocusOnPress:p,ref:t}),{focusableProps:C}=a(e,t);m&&(C.tabIndex=s?-1:C.tabIndex);let w=n(C,x,i(e,{labelable:!0}));return{isPressed:S,buttonProps:n(b,w,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}var l=e(t(),1),u=(0,l.createContext)({isSelected:!1}),d=(0,l.forwardRef)(function(e,t){[e,t]=r(e,t,u);let{isSelected:n,...i}=e;return l.createElement(s,{...i,ref:t,className:e.className||`react-aria-SelectionIndicator`,name:`SelectionIndicator`,isVisible:n})});export{u as n,c as r,d as t};