import{B as e,E as t,F as n,H as r,It as i,M as a,Q as o,U as s,W as c,Y as l,Z as u,_t as d,ft as f,ht as p,j as m,mt as h,pt as g,s as _,st as v,tt as y,u as b,x,yt as S}from"./BA99CCI5.js";import"./xihTtKlq.js";import"./DGo8yE5j.js";import{t as C}from"./DvT-Y1N62.js";var w=c(`<div class="z-50"><!></div>`),T=c(`<div class="group relative flex" role="group"><button><!> <!></button> <!></div>`);function E(c,E){let D=_(E,`icon`,8,void 0),O=_(E,`iconClass`,8,``),k=_(E,`square`,8,!0),A=_(E,`hasDropdown`,8,!1),j=_(E,`dropdownPosition`,8,`left`),M=_(E,`disabled`,8,!1),N=_(E,`title`,8,``),P=_(E,`type`,8,`button`),F=_(E,`variant`,8,`neutral`),I=_(E,`onboarding`,8,void 0),L=p(!1),R=null;function z(){R&&=(clearTimeout(R),null),d(L,!0)}function B(){R=setTimeout(()=>{d(L,!1)},100)}let V={neutral:`hover:bg-neutral-50 dark:hover:bg-neutral-800`,danger:`hover:bg-neutral-50 dark:hover:bg-neutral-800`},H={neutral:``,danger:`group-hover:text-red-600 dark:group-hover:text-red-400`};var U=T(),W=f(U),G=f(W),K=e=>{var t=s(),n=g(t);{let e=S(()=>(u(F()),y(()=>F()===`danger`?H.danger:``))),t=S(O);a(n,D,(n,r)=>{r(n,{size:20,get class(){return`text-neutral-700 dark:text-neutral-200 ${o(e)??``} ${o(t)??``}`}})})}r(e,t)};e(G,e=>{D()&&e(K)});var q=h(G,2);n(q,E,`default`,{},null),i(W);var J=h(W,2),Y=e=>{var t=w(),a=f(t);n(a,E,`dropdown`,{get dropdownPosition(){return j()},get open(){return o(L)}},null),i(t),m(3,t,()=>C,()=>({duration:150})),r(e,t)};e(J,e=>{A()&&o(L)&&e(Y)}),i(U),v(()=>{x(U,`data-onboarding`,I()),x(W,`type`,P()),x(W,`title`,N()),t(W,1,`flex items-center justify-center border border-neutral-300 bg-white transition-colors dark:border-neutral-700/60 dark:bg-neutral-800/50 ${k()?`h-10 w-10`:`h-10 px-4`} ${u(M()),u(F()),y(()=>M()?`cursor-not-allowed opacity-50`:V[F()])??``}`),W.disabled=M()}),l(`click`,W,function(e){b.call(this,E,e)}),l(`mouseenter`,U,z),l(`mouseleave`,U,B),r(c,U)}export{E as t};