import{C as e,Ct as t,E as n,Mt as r,Qt as i,W as a,X as o,dt as s,h as c,v as l,w as u}from"./vendor/json-editor-vue-eojr4v24.js";import{P as d,y as f}from"./client-nwyjxodt.js";import{t as p}from"./nbutton-gygn07c2.js";var m=n({__name:`NDropdown`,props:{modelValue:{type:Boolean},direction:{default:`start`}},setup(n,{emit:m}){let h=d(n,`modelValue`,m,{passive:!0}),g=t();return f(g,()=>{h.value=!1}),(t,d)=>{let f=p;return a(),l(`div`,{ref_key:`el`,ref:g,class:`relative`},[o(t.$slots,`trigger`,{enabled:r(h),click:()=>h.value=!r(h)},()=>[u(f,{onClick:d[0]||=e=>h.value=!r(h)},{default:s(()=>[...d[1]||=[e(` Dropdown `,-1)]]),_:1})]),c(`div`,{class:i([`absolute z-10 border n-border-base rounded n-bg-base shadow n-transition`,[r(h)?`op-100`:`op0 pointer-events-none -translate-y-1`,n.direction===`end`?`right-0`:`left-0`]])},[o(t.$slots,`default`)],2)],512)}}}),h=Object.assign(m,{__name:`NDropdown`});export{h as t};