var _=Object.defineProperty;var m=(n,a)=>_(n,"name",{value:a,configurable:!0});import{H as b,p as w}from"./vendor-primevue-B6rcS73U.js";import{e as y}from"./index-2-qFLlQP.js";import{bx as C,r as k,E as V,cN as $,j as z,d as r,k as D,e,A as u,u as s,c as d,F as M,y as N,z as B,q as f,s as S,by as p}from"./vendor-other-CSX7WseZ.js";import"./vendor-vue-CXt3ZZQ3.js";import"./vendor-xterm-CWYFmgbN.js";import"./vendor-three-BKWXAgVe.js";import"./vendor-tiptap-BkFTmTb3.js";const j={class:"w-113 max-w-md p-4 space-y-4"},E={class:"text-sm text-muted-foreground leading-tight"},F={class:"text-base-foreground font-medium"},q={class:"space-y-2"},A={class:"flex items-center gap-2 flex-1 min-w-0"},H={class:"flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 bg-secondary-background border border-border-subtle"},L={key:1,class:"text-xs font-normal text-base-foreground"},O={class:"flex flex-col gap-0.5 min-w-0 flex-1"},P={class:"text-sm font-normal text-base-foreground leading-tight"},T={class:"text-sm font-normal text-muted-foreground leading-tight"},Y=C({__name:"ValueControlPopover",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(n,{expose:a}){const l=k(),g=y();a({toggle:m(o=>{l.value.toggle(o)},"toggle")});const x=[{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"}],v=V(()=>g.get("Comfy.WidgetControlMode")),i=$(n,"modelValue");return(o,c)=>(r(),z(p(w),{ref_key:"popover",ref:l,class:"bg-interface-panel-surface border border-interface-stroke rounded-lg"},{default:D(()=>[e("div",j,[e("div",E,[u(s(o.$t("widgets.valueControl.header.prefix"))+" ",1),e("span",F,s(v.value==="before"?o.$t("widgets.valueControl.header.before"):o.$t("widgets.valueControl.header.after")),1),u(" "+s(o.$t("widgets.valueControl.header.postfix")),1)]),e("div",q,[(r(),d(M,null,N(x,t=>e("div",{key:t.mode,class:"flex items-center justify-between py-2 gap-7"},[e("div",A,[e("div",H,[t.icon?(r(),d("i",{key:0,class:S([t.icon,"text-base text-base-foreground"])},null,2)):f("",!0),t.text?(r(),d("span",L,s(t.text),1)):f("",!0)]),e("div",O,[e("div",P,[e("span",null,s(o.$t(`widgets.valueControl.${t.title}`)),1)]),e("div",T,s(o.$t(`widgets.valueControl.${t.description}`)),1)])]),B(p(b),{modelValue:i.value,"onUpdate:modelValue":c[0]||(c[0]=h=>i.value=h),class:"flex-shrink-0","input-id":t.mode,value:t.mode},null,8,["modelValue","input-id","value"])])),64))])])]),_:1},512))}});export{Y as default};
//# sourceMappingURL=ValueControlPopover-CgyNfIEw.js.map
