import{M as f}from"./MkMenu-6Et8UIBq.js";import{b as p,a as u,e as h,n as g,h as _,t as k,l as M}from"./vue-y3KLWBaS.js";import{n as v}from"./app-JmgyQoR0.js";const x="left",C=p({__name:"MkMenu.child",props:{items:{},targetElement:{},rootElement:{},width:{},viaKeyboard:{type:Boolean}},emits:["closed","actioned"],setup(i,{expose:l,emit:c}){const o=i,n=c,t=u();function s(){const e=o.rootElement.getBoundingClientRect(),a=o.targetElement.getBoundingClientRect(),d=o.targetElement.offsetWidth,m=a.top-e.top-8;t.value.style.left=d+"px",t.value.style.top=m+"px"}function r(e){n(e?"actioned":"closed")}return h(()=>{s(),g(()=>{s()})}),l({checkHit:e=>e.target===t.value||t.value.contains(e.target)}),(e,a)=>(_(),k("div",{ref_key:"el",ref:t,class:"sfhdhdhr",tabindex:"-1"},[M(f,{ref:"menu",items:e.items,align:x,width:e.width,"as-drawer":!1,onClose:r},null,8,["items","width"])],512))}}),B=v(C,[["__scopeId","data-v-bc599ef7"]]);export{B as default};
