import{I as C,J as l,h as b,K as u,v as o,Z as h,S as k,U as O,o as p,c as d,b as V,w as M,a as c,B as m,z as f,M as j,P as g,T as B}from"./entry.RGd0w9hd.js";import{o as $}from"./index.8phAC65J.js";import{b as A,u as E}from"./selectMenu.C9lwG85K.js";import{u as T}from"./usePopper._FH1S1iZ.js";import{_ as z}from"./_plugin-vue_export-helper.x3n3nnut.js";import"./index.g8c07QCY.js";const N={wrapper:"relative",container:"z-20 group",width:"",background:"bg-white dark:bg-gray-900",shadow:"shadow-lg",rounded:"rounded-md",ring:"ring-1 ring-gray-200 dark:ring-gray-800",base:"overflow-hidden focus:outline-none relative",transition:{enterActiveClass:"transition ease-out duration-200",enterFromClass:"opacity-0 translate-y-1",enterToClass:"opacity-100 translate-y-0",leaveActiveClass:"transition ease-in duration-150",leaveFromClass:"opacity-100 translate-y-0",leaveToClass:"opacity-0 translate-y-1"},popper:{placement:"bottom-start",scroll:!1},arrow:A},P=C(l.ui.strategy,l.ui.contextMenu,N),S=b({inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},virtualElement:{type:Object,required:!0},popper:{type:Object,default:()=>({})},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:modelValue","close"],setup(e,{emit:s}){const{ui:a,attrs:n}=E("contextMenu",u(e,"ui"),P),t=o(()=>h({},e.popper,a.value.popper)),r=o({get(){return e.modelValue},set(w){s("update:modelValue",w)}}),v=u(e,"virtualElement"),[,i]=T(t.value,v),y=o(()=>k(O(a.value.container,a.value.width),e.class));return $(i,()=>{r.value=!1}),{ui:a,attrs:n,isOpen:r,wrapperClass:y,popper:t,container:i}}});function F(e,s,a,n,t,r){return e.isOpen?(p(),d("div",g({key:0,ref:"container",class:e.wrapperClass},e.attrs),[V(B,g({appear:""},e.ui.transition),{default:M(()=>[c("div",null,[e.popper.arrow?(p(),d("div",{key:0,"data-popper-arrow":"",class:m(Object.values(e.ui.arrow))},null,2)):f("",!0),c("div",{class:m([e.ui.base,e.ui.ring,e.ui.rounded,e.ui.shadow,e.ui.background])},[j(e.$slots,"default")],2)])]),_:3},16)],16)):f("",!0)}const Z=z(S,[["render",F]]);export{Z as default};
