import{z as d,aa as p,f as u}from"./kul02k0k.js";import{k as m,b as c,Q as f,S as b,V as n,a0 as v,$ as k,a6 as V,u as s,U as _,Y as B}from"./vendor/json-editor-vue-kmaz80fw.js";const y=m({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=d(r,"modelValue",l,{passive:!0}),t=c();return p(t,()=>{e.value=!1}),(a,o)=>{const i=u;return f(),b("div",{ref_key:"el",ref:t,class:"relative"},[n(a.$slots,"trigger",{enabled:s(e),click:()=>e.value=!s(e)},()=>[v(i,{onClick:o[0]||(o[0]=$=>e.value=!s(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",[s(e)?"op-100":"op0 pointer-events-none -translate-y-1",a.direction==="end"?"right-0":"left-0"]])},[n(a.$slots,"default")],2)],512)}}});export{y as _};
