import{i as e,n as t}from"./rolldown-runtime-BKYq3fBv.js";import{$n as n,Cr as r,Gn as i,Mr as a,Nn as o,Rr as s,Tr as c,Xn as l,Zn as u,ai as d,ar as f,dt as p,er as m,ft as h,ir as g,si as _,sr as v,ui as y}from"./vendor-primevue-D50rA9nL.js";import{n as b,t as x}from"./Button-DzMg17Os.js";import{co as S,so as C}from"./dialogService-Cr3DyAja.js";var w,T,E,D,O,k,A,j,M,N,P,F=t((()=>{o(),p(),b(),C(),w={class:`w-113 max-w-md p-4 space-y-4`},T={class:`text-sm text-muted-foreground leading-tight`},E={class:`text-base-foreground font-medium`},D={class:`space-y-2`},O={class:`flex items-center gap-2 flex-1 min-w-0 text-wrap`},k={class:`flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 bg-secondary-background border border-border-subtle`},A={key:1,class:`text-xs font-normal text-base-foreground`},j={class:`flex flex-col gap-0.5 min-w-0 flex-1`},M={class:`text-sm font-normal text-base-foreground leading-tight`},N={class:`text-sm font-normal text-muted-foreground leading-tight`},P=v({__name:`ValueControlPopover`,props:{modelValue:{},modelModifiers:{}},emits:[`update:modelValue`],setup(e){let t=S(),o=[{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`}],p=l(()=>t.get(`Comfy.WidgetControlMode`)),v=a(e,`modelValue`);return(e,t)=>(r(),m(`div`,w,[u(`div`,T,[g(y(e.$t(`widgets.valueControl.header.prefix`))+` `,1),u(`span`,E,y(p.value===`before`?e.$t(`widgets.valueControl.header.before`):e.$t(`widgets.valueControl.header.after`)),1),g(` `+y(e.$t(`widgets.valueControl.header.postfix`)),1)]),u(`div`,D,[(r(),m(i,null,c(o,i=>f(x,{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:s(()=>[u(`div`,O,[u(`div`,k,[i.icon?(r(),m(`i`,{key:0,class:_([i.icon,`text-base text-base-foreground`])},null,2)):n(``,!0),i.text?(r(),m(`span`,A,y(i.text),1)):n(``,!0)]),u(`div`,j,[u(`div`,M,[u(`span`,null,y(e.$t(`widgets.valueControl.${i.title}`)),1)]),u(`div`,N,y(e.$t(`widgets.valueControl.${i.description}`)),1)])]),f(d(h),{modelValue:v.value,"onUpdate:modelValue":t[0]||=e=>v.value=e,class:`shrink`,"input-id":i.mode,value:i.mode},null,8,[`modelValue`,`input-id`,`value`])]),_:2},1032,[`for`])),64))])]))}})})),I;t((()=>{F(),F(),I=P}))();export{I as default};
//# sourceMappingURL=ValueControlPopover-B2Yxc-JB.js.map