import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{A as t,F as n,Ht as r,I as i,K as a,Lt as o,O as s,R as c,S as l,_t as u,et as d,j as f,k as p,nt as m,rt as h,zt as g}from"./vendor-vue-core-IZuWV8u3.js";import{B as _,H as v,U as y,V as b,z as x}from"./vendor-reka-ui-Dfvl2gA8.js";import{t as S}from"./src-B0kocU_l.js";import{t as C}from"./Button-uSZXZovG.js";var w={class:`flex flex-col p-1`},T={key:0,class:`border-b w-full border-border-subtle`},E=[`onClick`],D=c({inheritAttrs:!1,__name:`Popover`,props:{entries:{},icon:{},to:{},showArrow:{type:Boolean,default:!0}},setup(e){return(e,c)=>(d(),p(o(y),null,{default:u(({close:c})=>[i(o(x),{"as-child":``},{default:u(()=>[h(e.$slots,`button`,{},()=>[i(C,{size:`icon`},{default:u(()=>[s(`i`,{class:g(e.icon??`icon-[lucide--ellipsis]`)},null,2)]),_:1})])]),_:3}),i(o(_),{to:e.to},{default:u(()=>[i(o(b),a({side:`bottom`,"side-offset":5,"collision-padding":10},e.$attrs,{class:`z-1700 rounded-lg p-2 bg-base-background shadow-sm border border-border-subtle will-change-[transform,opacity] data-[state=open]:data-[side=top]:animate-slideDownAndFade data-[state=open]:data-[side=right]:animate-slideLeftAndFade data-[state=open]:data-[side=bottom]:animate-slideUpAndFade data-[state=open]:data-[side=left]:animate-slideRightAndFade`}),{default:u(()=>[h(e.$slots,`default`,{close:c},()=>[s(`div`,w,[(d(!0),f(l,null,m(e.entries??[],e=>(d(),f(l,{key:e.label},[e.separator?(d(),f(`div`,T)):(d(),f(`div`,{key:1,class:g(o(S)(`flex flex-row gap-4 p-2 rounded-sm my-1`,e.disabled?`opacity-50 pointer-events-none`:e.command&&`cursor-pointer hover:bg-secondary-background-hover`)),onClick:t=>{!e.command||e.disabled||(e.command({originalEvent:t,item:e}),c())}},[e.icon?(d(),f(`i`,{key:0,class:g(e.icon)},null,2)):t(``,!0),n(` `+r(e.label),1)],10,E))],64))),128))])]),e.showArrow?(d(),p(o(v),{key:0,class:`fill-base-background stroke-border-subtle`})):t(``,!0)]),_:2},1040)]),_:2},1032,[`to`])]),_:3}))}});export{D as t};
//# sourceMappingURL=Popover-BV6_S20i.js.map