import{a as d}from"./BYYLVaSZ.js";import{d as p,ag as u,r as c,am as m,i as f,o as b,b as n,f as v,aj as _,w as C,an as g,t as k,u as o,n as V}from"./Dih1Xbo1.js";const $=p({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"},text:{},contentClasses:{}},setup(r,{emit:l}){const e=u(r,"modelValue",l,{passive:!0}),s=c();return m(s,()=>{e.value=!1}),(t,a)=>{const i=d;return b(),f("div",{ref_key:"el",ref:s,class:"relative"},[n(t.$slots,"trigger",{enabled:o(e),click:()=>e.value=!o(e)},()=>[_(i,{onClick:a[0]||(a[0]=N=>e.value=!o(e))},{default:C(()=>[g(k(t.text??"Dropdown"),1)]),_:1})]),v("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",t.contentClasses]])},[n(t.$slots,"default")],2)],512)}}});export{$ as _};
