import{z as d,aa as p,f as u}from"./h48l6b7a.js";import{l as c,c as m,R as f,U as v,W as n,a1 as b,a0 as V,a7 as k,u as a,V as _,Z as B}from"./vendor/json-editor-vue-hrh84odz.js";const y=c({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=d(r,"modelValue",l,{passive:!0}),t=m();return p(t,()=>{e.value=!1}),(s,o)=>{const i=u;return f(),v("div",{ref_key:"el",ref:t,class:"relative"},[n(s.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[b(i,{onClick:o[0]||(o[0]=g=>e.value=!a(e))},{default:V(()=>o[1]||(o[1]=[k(" Dropdown ")])),_:1})]),_("div",{class:B(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[a(e)?"op-100":"op0 pointer-events-none -translate-y-1",s.direction==="end"?"right-0":"left-0"]])},[n(s.$slots,"default")],2)],512)}}});export{y as _};
