"use client";import{useFocusRing as b}from"@react-aria/focus";import{useHover as P}from"@react-aria/interactions";import{useMemo as B}from"react";import{useActivePress as c}from'../../hooks/use-active-press.js';import{useDisabled as g}from'../../internal/disabled.js';import{forwardRefWithAs as A,mergeProps as _,render as F,useMergeRefsFn as R}from'../../utils/render.js';let v="button";function E(a,u){var p;let l=g(),i=R(),{disabled:e=l||!1,autoFocus:t=!1,...o}=a,{isFocusVisible:r,focusProps:T}=b({autoFocus:t}),{isHovered:s,hoverProps:f}=P({isDisabled:e}),{pressed:n,pressProps:m}=c({disabled:e}),d=_({ref:u,type:(p=o.type)!=null?p:"button",disabled:e||void 0,autoFocus:t},T,f,m),y=B(()=>({disabled:e,hover:s,focus:r,active:n,autofocus:t}),[e,s,r,n,t]);return F({mergeRefs:i,ourProps:d,theirProps:o,slot:y,defaultTag:v,name:"Button"})}let L=A(E);export{L as Button};
