import{a as d}from"./CuzaDH-7.js";import{d as p,B as c,r as u,C as m,o as f,e as b,p as n,z as v,w as _,D as k,t as B,b as o,a as C,n as V}from"./BvNnk7SS.js";const $=p({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"},text:{}},setup(r,{emit:l}){const e=c(r,"modelValue",l,{passive:!0}),s=u();return m(s,()=>{e.value=!1}),(t,a)=>{const i=d;return f(),b("div",{ref_key:"el",ref:s,class:"relative"},[n(t.$slots,"trigger",{enabled:o(e),click:()=>e.value=!o(e)},()=>[v(i,{onClick:a[0]||(a[0]=N=>e.value=!o(e))},{default:_(()=>[k(B(t.text??"Dropdown"),1)]),_:1})]),C("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[o(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 _};
