import{d as i,Y as p,r as u,aS as c,o as m,m as f,a8 as n,i as v,j as b,v as k,f as s,k as _,D as V,_ as B}from"./zEcrVex8.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=p(r,"modelValue",l,{passive:!0}),a=u();return c(a,()=>{e.value=!1}),(t,o)=>{const d=B;return m(),f("div",{ref_key:"el",ref:a,class:"relative"},[n(t.$slots,"trigger",{enabled:s(e),click:()=>e.value=!s(e)},()=>[v(d,{onClick:o[0]||(o[0]=g=>e.value=!s(e))},{default:b(()=>o[1]||(o[1]=[k(" Dropdown ")])),_:1})]),_("div",{class:V(["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{$ as _};
