import{C,D as l,f as b,E as u,i as o,V as h,N as k,O,o as p,c as d,b as V,w as j,a as c,x as m,k as f,H as E,K as g,T as M}from"./entry.2xM5grDS.js";import{o as $}from"./index.xpopmiYL.js";import{b as A,u as B}from"./selectMenu.72ERhOvP.js";import{u as N}from"./usePopper.JfFIoxIh.js";import{_ as T}from"./_plugin-vue_export-helper.x3n3nnut.js";import"./index.OjlVAl1H.js";const z={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},F=C(l.ui.strategy,l.ui.contextMenu,z),P=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}=B("contextMenu",u(e,"ui"),F),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]=N(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 S(e,s,a,n,t,r){return e.isOpen?(p(),d("div",g({key:0,ref:"container",class:e.wrapperClass},e.attrs),[V(M,g({appear:""},e.ui.transition),{default:j(()=>[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])},[E(e.$slots,"default")],2)])]),_:3},16)],16)):f("",!0)}const R=T(P,[["render",S]]);export{R as default};
