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