import{defineComponent as v,computed as e,ref as c,watch as p,createVNode as a,Transition as M,withDirectives as h,vShow as g}from"vue";import y from"./SubMenuList.mjs";import{useInjectMenu as S,MenuContextProvider as I}from"./hooks/useMenuContext.mjs";const L=v({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,{slots:s}){const n=e(()=>"inline"),{motion:f,mode:r,defaultMotions:l}=S(),o=e(()=>r.value===n.value),i=c(!o.value),d=e(()=>o.value?t.open:!1);p(r,()=>{o.value&&(i.value=!1)},{flush:"post"});const m=e(()=>{const u=f.value||l.value?.[n.value]||l.value?.other;return{...typeof u=="function"?u():u,appear:t.keyPath.length<=1}});return()=>i.value?null:a(I,{mode:n.value},{default:()=>[a(M,m.value,{default:()=>[h(a(y,{id:t.id},{default:()=>[s.default?.()]}),[[g,d.value]])]})]})}});export{L as default};
