import{C as d,ab as p,_ as u}from"./ebt3cj6n.js";import{p as m,f as c,U as f,W as b,Y as n,a3 as v,a2 as _,a9 as k,u as a,X as C,a0 as V}from"./vendor/json-editor-vue-kcahofzr.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}),(s,o)=>{const i=u;return f(),b("div",{ref_key:"el",ref:t,class:"relative"},[n(s.$slots,"trigger",{enabled:a(e),click:()=>e.value=!a(e)},()=>[v(i,{onClick:o[0]||(o[0]=g=>e.value=!a(e))},{default:_(()=>o[1]||(o[1]=[k(" Dropdown ")])),_:1})]),C("div",{class:V(["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 _};
