import{y as d,ac as p,e as u}from"./howhlbef.js";import{k as c,b as m,R as f,U as b,W as n,a1 as v,a0 as k,a7 as V,u as s,V as _,Z as B}from"./vendor/json-editor-vue-gplv2x2n.js";const $=c({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=d(r,"modelValue",l,{passive:!0}),t=m();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]=g=>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{$ as _};
