const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueControlPopover-C5kdd3VH.js","./vendor-primevue-DxVRNMbC.js","./vendor-vue-core-X6q-rGJs.js","./rolldown-runtime-DCMCV6zW.js","./dialogService-Cqui0UMO.js","./_plugin-vue_export-helper-fSAtQzP-.js","./vendor-other-CyG3qq8S.js","./vendor-firebase-CdLSXhbt.js","./vendor-three-CHi1XwmR.js","./vendor-tiptap-BXSIIPYY.js","./vendor-reka-ui-CHPbCe4i.js","./vendor-i18n-B5g6Drzm.js","./vendor-vueuse-B_IQhD9R.js","./vendor-axios-CRrcibNk.js","./vendor-zod-CXYiBHkN.js","./systemStatsStore-D9aNY5gT.js","./api-DQLKc1Xa.js","./vendor-markdown-Cola12Wc.js","./vendor-yjs-bg4j8JjP.js","./i18n-DjV_9lZM.js","./widget-B3lMdpiR.js","./types-DW97iHDr.js","./colorUtil-Cth7eqhK.js","./src-Bx0QZVd-.js","./Button-C7dWyQyS.js","./SelectValue-pba3ZPgy.js","./useCopyToClipboard-C74olorb.js","./useErrorHandling-BFB8eSj5.js","./useExternalLink-Cc30SNi3.js","./envUtil-CcEF5ALS.js","./useFeatureFlags-CxRWjdi1.js","./telemetry-KciZP3tz.js","./dialogStore-CXD5Bcfy.js","./widgetTypes-CUvQHbLo.js","./markdownRendererUtil-Bm7Umh6C.js","./vendor-other-CaaUC6Qe.css","./dialogService-BE9OqwG5.css"])))=>i.map(i=>d[i]);
import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{ut as t}from"./vendor-primevue-DxVRNMbC.js";import{A as n,D as r,Dt as i,F as a,G as o,I as s,It as c,K as l,L as u,O as d,R as f,Rt as p,S as m,Vt as h,et as g,gt as _,j as v,k as y,nt as b,ot as x,pt as S,rt as C,ut as w}from"./vendor-vue-core-X6q-rGJs.js";import{C as T,E,S as D,T as O,w as k}from"./vendor-reka-ui-CHPbCe4i.js";import{t as A}from"./src-Bx0QZVd-.js";import{t as j}from"./Button-C7dWyQyS.js";var M={class:`flex flex-col p-1`},N=[`onClick`],P=f({inheritAttrs:!1,__name:`Popover`,props:{entries:{},icon:{},to:{}},setup(e){return(e,t)=>(g(),y(c(E),null,{default:_(({close:t})=>[s(c(D),{"as-child":``},{default:_(()=>[C(e.$slots,`button`,{},()=>[s(j,{size:`icon`},{default:_(()=>[d(`i`,{class:p(e.icon??`icon-[lucide--ellipsis]`)},null,2)]),_:1})])]),_:3}),s(c(T),{to:e.to},{default:_(()=>[s(c(k),l({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:_(()=>[C(e.$slots,`default`,{},()=>[d(`div`,M,[(g(!0),v(m,null,b(e.entries??[],(e,r)=>(g(),v(`section`,{key:r,class:`flex flex-col border-b-2 last:border-none border-border-subtle`},[(g(!0),v(m,null,b(e,({label:e,action:r,icon:i})=>(g(),v(`div`,{key:e,class:p(c(A)(`flex flex-row gap-4 p-2 rounded-sm my-1`,r&&`cursor-pointer hover:bg-secondary-background-hover`)),onClick:()=>{r&&(r(),t())}},[i?(g(),v(`i`,{key:0,class:p(i)},null,2)):n(``,!0),a(` `+h(e),1)],10,N))),128))]))),128))])]),s(c(O),{class:`fill-base-background stroke-border-subtle`})]),_:2},1040)]),_:2},1032,[`to`])]),_:3}))}}),F={class:`relative grid grid-cols-subgrid`},I=f({__name:`WidgetWithControl`,props:o({widget:{},component:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=u(()=>t(()=>import(`./ValueControlPopover-C5kdd3VH.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36]),import.meta.url)),a=e,o=w(e,`modelValue`),f=i(a.widget.controlWidget.value),m=r(()=>{switch(f.value){case`increment`:return`pi pi-plus`;case`decrement`:return`pi pi-minus`;case`fixed`:return`icon-[lucide--pencil-off]`;default:return`icon-[lucide--shuffle]`}});return S(f,a.widget.controlWidget.update),(e,t)=>(g(),v(`div`,F,[(g(),y(x(e.component),l(e.$attrs,{modelValue:o.value,"onUpdate:modelValue":t[1]||=e=>o.value=e,widget:e.widget}),{default:_(()=>[s(P,null,{button:_(()=>[s(j,{variant:`textonly`,size:`sm`,class:`h-4 w-7 p-0 self-center rounded-xl bg-primary-background/30 hover:bg-primary-background-hover/30`},{default:_(()=>[d(`i`,{class:p(`${m.value} text-primary-background text-xs w-full`)},null,2)]),_:1})]),default:_(()=>[s(c(n),{modelValue:f.value,"onUpdate:modelValue":t[0]||=e=>f.value=e},null,8,[`modelValue`])]),_:1})]),_:1},16,[`modelValue`,`widget`]))]))}});export{P as n,I as t};
//# sourceMappingURL=WidgetWithControl-cWoD2C6N.js.map