const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ValueControlPopover-BJ0z5W84.js","./vendor-primevue-7po8Zk9v.js","./vendor-vue-core-D3IvUUeM.js","./rolldown-runtime-DCMCV6zW.js","./dialogService-BC0EXJA5.js","./_plugin-vue_export-helper-CTPoQIH5.js","./vendor-other-CrvBxfcV.js","./vendor-firebase-CdLSXhbt.js","./vendor-three-Qz0FU1fN.js","./vendor-tiptap-DsZVujQD.js","./vendor-reka-ui-Bm3o_ZTf.js","./vendor-i18n-CsAN_zFP.js","./vendor-vueuse-ChSVzIZz.js","./vendor-axios-BKU8NR6A.js","./vendor-zod-D3H3ICYK.js","./systemStatsStore-gvlzOl4W.js","./api-3C7_IVZO.js","./vendor-yjs-bg4j8JjP.js","./i18n-DjEVEIh2.js","./widget-B3lMdpiR.js","./types-0oh-UGWL.js","./envUtil-DPL4J8Ws.js","./colorUtil-C83P1Arv.js","./src-ByuP5s1t.js","./Button-mG8zDgxj.js","./SelectValue-Dja3qCIp.js","./useCopyToClipboard-CUuoo5Dm.js","./useErrorHandling-CBX3YQ5l.js","./remoteConfig-CNDr9CtS.js","./dialogStore-BbHfkjRE.js","./widgetTypes-DWH_HSBH.js","./markdownRendererUtil-D5cHPoK2.js","./vendor-markdown-yjaB1jgA.js","./vendor-other-CaaUC6Qe.css","./dialogService-Dpt-OVzG.css"])))=>i.map(i=>d[i]);
import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{ut as t}from"./vendor-primevue-7po8Zk9v.js";import{$ as n,A as r,Bt as i,D as a,E as o,Et as s,F as c,Ft as l,G as u,I as d,L as f,Lt as p,O as m,P as h,W as g,at as _,ft as v,ht as y,k as b,lt as x,nt as S,tt as C,x as w}from"./vendor-vue-core-D3IvUUeM.js";import{C as T,E,S as D,T as O,w as k}from"./vendor-reka-ui-Bm3o_ZTf.js";import{t as A}from"./src-ByuP5s1t.js";import{t as j}from"./Button-mG8zDgxj.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)=>(n(),m(l(E),null,{default:y(({close:t})=>[c(l(D),{"as-child":``},{default:y(()=>[S(e.$slots,`button`,{},()=>[c(j,{size:`icon`},{default:y(()=>[a(`i`,{class:p(e.icon??`icon-[lucide--ellipsis]`)},null,2)]),_:1})])]),_:3}),c(l(T),{to:e.to},{default:y(()=>[c(l(k),u({side:`bottom`,"side-offset":5,"collision-padding":10},e.$attrs,{class:`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:y(()=>[S(e.$slots,`default`,{},()=>[a(`div`,M,[(n(!0),r(w,null,C(e.entries??[],(e,a)=>(n(),r(`section`,{key:a,class:`flex flex-col border-b-2 last:border-none border-border-subtle`},[(n(!0),r(w,null,C(e,({label:e,action:a,icon:o})=>(n(),r(`div`,{key:e,class:p(l(A)(`flex flex-row gap-4 p-2 rounded-sm my-1`,a&&`cursor-pointer hover:bg-secondary-background-hover`)),onClick:()=>{a&&(a(),t())}},[o?(n(),r(`i`,{key:0,class:p(o)},null,2)):b(``,!0),h(` `+i(e),1)],10,N))),128))]))),128))])]),c(l(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:g({widget:{},component:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let i=d(()=>t(()=>import(`./ValueControlPopover-BJ0z5W84.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]),import.meta.url)),f=e,h=x(e,`modelValue`),g=s(f.widget.controlWidget.value),b=o(()=>{switch(g.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 v(g,f.widget.controlWidget.update),(e,t)=>(n(),r(`div`,F,[(n(),m(_(e.component),u(e.$attrs,{modelValue:h.value,"onUpdate:modelValue":t[1]||=e=>h.value=e,widget:e.widget}),{default:y(()=>[c(P,null,{button:y(()=>[c(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:y(()=>[a(`i`,{class:p(`${b.value} text-primary-background text-xs w-full`)},null,2)]),_:1})]),default:y(()=>[c(l(i),{modelValue:g.value,"onUpdate:modelValue":t[0]||=e=>g.value=e},null,8,[`modelValue`])]),_:1})]),_:1},16,[`modelValue`,`widget`]))]))}});export{P as n,I as t};
//# sourceMappingURL=WidgetWithControl-BtTT3_Ep.js.map