import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{M as t}from"./vendor-primevue-DyvCA8Nd.js";import"./vendor-firebase-yTFzdAQf.js";import{A as n,D as r,F as i,Ht as a,I as o,Lt as s,O as c,R as l,S as u,_t as d,et as f,j as p,nt as m,ut as h,zt as g}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-Q0G0D0d6.js";import"./useFeatureFlags-BfqxvwHy.js";import"./api-C840HmAF.js";import"./vendor-markdown-8POvMhty.js";import"./colorUtil-Q3kaA72Z.js";import"./i18n-B8CRKNXU.js";import"./vendor-reka-ui-Dfvl2gA8.js";import{t as _}from"./Button-uSZXZovG.js";import{i as v}from"./dialogService-J-k0CeI4.js";import"./systemStatsStore-BJOd4X3d.js";import"./userStore-o2bxxBJt.js";import"./useErrorHandling-t4kNWELW.js";import"./vendor-tiptap-BZCaYoPl.js";import"./Popover-BV6_S20i.js";import"./markdownRendererUtil-DH1PCfUd.js";import"./useExternalLink-Cxwyf6Kb.js";var y={class:`w-113 max-w-md p-4 space-y-4`},b={class:`text-sm text-muted-foreground leading-tight`},x={class:`text-base-foreground font-medium`},S={class:`space-y-2`},C={class:`flex items-center gap-2 flex-1 min-w-0 text-wrap`},w={class:`flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 bg-secondary-background border border-border-subtle`},T={key:1,class:`text-xs font-normal text-base-foreground`},E={class:`flex flex-col gap-0.5 min-w-0 flex-1`},D={class:`text-sm font-normal text-base-foreground leading-tight`},O={class:`text-sm font-normal text-muted-foreground leading-tight`},k=l({__name:`ValueControlPopover`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let l=v(),k=[{mode:`fixed`,icon:`icon-[lucide--pencil-off]`,title:`fixed`,description:`fixedDesc`},{mode:`increment`,text:`+1`,title:`increment`,description:`incrementDesc`},{mode:`decrement`,text:`-1`,title:`decrement`,description:`decrementDesc`},{mode:`randomize`,icon:`icon-[lucide--shuffle]`,title:`randomize`,description:`randomizeDesc`}],A=r(()=>l.get(`Comfy.WidgetControlMode`)),j=h(e,`modelValue`);return(e,r)=>(f(),p(`div`,y,[c(`div`,b,[i(a(e.$t(`widgets.valueControl.header.prefix`))+` `,1),c(`span`,x,a(A.value===`before`?e.$t(`widgets.valueControl.header.before`):e.$t(`widgets.valueControl.header.after`)),1),i(` `+a(e.$t(`widgets.valueControl.header.postfix`)),1)]),c(`div`,S,[(f(),p(u,null,m(k,i=>o(_,{key:i.mode,as:`label`,variant:`textonly`,size:`lg`,class:`flex w-full h-[unset] text-left items-center justify-between py-2 gap-7`,for:i.mode},{default:d(()=>[c(`div`,C,[c(`div`,w,[i.icon?(f(),p(`i`,{key:0,class:g([i.icon,`text-base text-base-foreground`])},null,2)):n(``,!0),i.text?(f(),p(`span`,T,a(i.text),1)):n(``,!0)]),c(`div`,E,[c(`div`,D,[c(`span`,null,a(e.$t(`widgets.valueControl.${i.title}`)),1)]),c(`div`,O,a(e.$t(`widgets.valueControl.${i.description}`)),1)])]),o(s(t),{modelValue:j.value,"onUpdate:modelValue":r[0]||=e=>j.value=e,class:`shrink`,"input-id":i.mode,value:i.mode},null,8,[`modelValue`,`input-id`,`value`])]),_:2},1032,[`for`])),64))])]))}});export{k as default};
//# sourceMappingURL=ValueControlPopover-DEfcpKva.js.map