import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{A as t,Bt as n,F as r,I as i,K as a,O as o,R as s,Rt as c,S as l,Ut as u,_t as d,et as f,j as p,k as m,nt as h,rt as g}from"./vendor-vue-core-BdhYaYlO.js";import{G as _,H as v,K as y,U as b,V as x}from"./vendor-reka-ui-CSo89nDv.js";import{t as S}from"./src-zUtq9Eft.js";import{t as C}from"./Button-DHxPjNdi.js";var w={class:`flex flex-col p-1`},T={key:0,class:`border-b w-full border-border-subtle`},E=[`onClick`],D=s({inheritAttrs:!1,__name:`Popover`,props:{entries:{},icon:{},to:{},showArrow:{type:Boolean,default:!0}},setup(e){return(e,s)=>(f(),m(c(y),null,{default:d(({close:s})=>[i(c(x),{"as-child":``},{default:d(()=>[g(e.$slots,`button`,{},()=>[i(C,{size:`icon`},{default:d(()=>[o(`i`,{class:n(e.icon??`icon-[lucide--ellipsis]`)},null,2)]),_:1})])]),_:3}),i(c(v),{to:e.to},{default:d(()=>[i(c(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:d(()=>[g(e.$slots,`default`,{close:s},()=>[o(`div`,w,[(f(!0),p(l,null,h(e.entries??[],e=>(f(),p(l,{key:e.label},[e.separator?(f(),p(`div`,T)):(f(),p(`div`,{key:1,class:n(c(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}),s())}},[e.icon?(f(),p(`i`,{key:0,class:n(e.icon)},null,2)):t(``,!0),r(` `+u(e.label),1)],10,E))],64))),128))])]),e.showArrow?(f(),m(c(_),{key:0,class:`fill-base-background stroke-border-subtle`})):t(``,!0)]),_:2},1040)]),_:2},1032,[`to`])]),_:3}))}});export{D as t};
//# sourceMappingURL=Popover-_oREh-V5.js.map