import{_ as h}from"./client-only.Ba2sAbuW.js";import{k as s,y as f,x as d,D as v,j as C,r as y,c as I,w as D,h as $,l as b,m as a,U as B,u as _,v as g,B as E,V as O,K as V,E as A}from"./headlessui.KhaQJLTS.js";import{G as T}from"./entry.DycPt8dI.js";import{_ as P}from"./_plugin-vue_export-helper.Dsey1Y2C.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="468dcd71-b5b9-47db-8a2c-6bd81b67c23f",e._sentryDebugIdIdentifier="sentry-dbid-468dcd71-b5b9-47db-8a2c-6bd81b67c23f")}catch{}})();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="38a4673d-df6a-4bdc-9c60-03a2e640e798",e._sentryDebugIdIdentifier="sentry-dbid-38a4673d-df6a-4bdc-9c60-03a2e640e798")}catch{}})();const N={},S={class:"bg-grey-0 border border-grey-800 p-6 overflow-hidden shadow-0 rounded-xs pointer-events-auto relative"},U={key:0,class:"mt-4"};function j(e,o){return s(),f("div",S,[d(e.$slots,"default"),e.$slots.action?(s(),f("div",U,[d(e.$slots,"action")])):v("",!0)])}const z=P(N,[["render",j]]),q=C({inheritAttrs:!1,__name:"base-popup",props:{modelValue:{type:Boolean},delay:{default:5e3},noAutoClose:{type:Boolean,default:!1},noCloseOnClickOutside:{type:Boolean,default:!1},placement:{default:"top-right"}},emits:["update:model-value","close"],setup(e,{expose:o,emit:l}){const n=e,p=l,r=y(null),i=I({get(){return n.modelValue},set(t){p("update:model-value",t)}});let u=null;const c=()=>{i.value=!1,u&&clearTimeout(u)},k=()=>{p("close")};T(r,()=>{n.noCloseOnClickOutside||c()});const m=y(0);return D(i,t=>{t&&(m.value+=1),t&&!n.noAutoClose&&(u=setTimeout(c,n.delay))}),$(c),o({root:r}),(t,G)=>{const w=h;return s(),b(w,null,{default:a(()=>[(s(),b(B,{key:_(m),to:t.placement!=="auto"?`#popup-container-${t.placement}`:"body",disabled:t.placement==="auto"},[g(A,{name:"fade-static",mode:"out-in",appear:"",onAfterLeave:k},{default:a(()=>[_(i)?(s(),f("div",{key:0,ref_key:"rootElement",ref:r},[g(z,E(O(t.$attrs)),V({default:a(()=>[d(t.$slots,"default")]),_:2},[t.$slots.action?{name:"action",fn:a(()=>[d(t.$slots,"action")]),key:"0"}:void 0]),1040)],512)):v("",!0)]),_:3})],8,["to","disabled"]))]),_:3})}}});export{q as _};
