import{C as i,aa as p,_ as u}from"./m6q5jxyf.js";import{p as m,f as c,P as f,a1 as v,U as n,Q as _,a3 as b,u as t,a2 as k,a9 as C,X as V}from"./vendor/json-editor-vue-llkaejaf.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]=[C(" Dropdown ")])),_:1})]),_("div",{class:V(["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 _};
