import{y as d,ac as p,e as u}from"./co7as50x.js";import{k as c,b as m,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-e8m4tbbs.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}),a=m();return p(a,()=>{e.value=!1}),(t,o)=>{const i=u;return f(),b("div",{ref_key:"el",ref:a,class:"relative"},[n(t.$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",t.direction==="end"?"right-0":"left-0"]])},[n(t.$slots,"default")],2)],512)}}});export{y as _};
