import{d as k,ar as y,A as i,bn as v,bo as _,bp as h,h as b,a9 as t,br as A}from"../../../../common/preload-helper.BAt0wiQU.js";import{p as B}from"../../index.CwVZreOu.js";/* empty css                                                                                      */import"../../../../common/DnDDataTableControl.vue_vue_type_style_index_0_scoped_0b913e4f_lang.CI1SyTf2.js";/* empty css                                                                                                 */import{_ as D}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.8NM1WLzi.js";/* empty css                                                                                        */import{A as H}from"../../../../common/index.C74CZaRi.js";import"../../../../common/index.Bkgl5HZD.js";import"../../../../common/motion.DDNFslEg.js";import"../../../../common/DownOutlined.DGkCTtd_.js";import"../../../../common/isMobile.DycClExL.js";import"../../../../common/warning.Dss1f44C.js";import"../../../../common/KeyCode.D63Tfrq7.js";import"../../../../common/FormItemContext.B-agHi0o.js";import"../../../../common/createContext.DKLY0CB7.js";import"../../../../common/statusUtils.-yEA-Gfk.js";import"../../../../common/index.C2RKq64j.js";import"../../../../common/compact-item.CKdY6bQm.js";const I={class:"wwp-row-handle"},L={class:"wwp-left-content"},M={class:"wwp-right-content"},O=["innerHTML"],ee=k({__name:"PercentControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(w,{emit:x}){var p,l,m;const C=w,{params:g}=y(C),e=g.value,a=i((p=e.default)!=null?p:""),N=i((l=e.step)!=null?l:1),n=i((m=e.disabled)!=null?m:!1),r=x,o=i([]);a.value!==""&&!n.value&&(o.value[e.id]=a.value+"%",r("fieldData",o.value));const s=d=>{o.value[e.id]=d+"%",r("fieldData",o.value)};return(d,u)=>{var c,f;return v(),_("div",I,[h("div",L,[b(t(D),{params:t(e)},null,8,["params"])]),h("div",M,[b(t(H),{id:t(e).id,value:a.value,"onUpdate:value":u[0]||(u[0]=V=>a.value=V),name:t(e).id,placeholder:t(e).placeholder,min:t(e).min,max:t(e).max,step:N.value,disabled:n.value,onInput:s,onChange:s},null,8,["id","value","name","placeholder","min","max","step","disabled"]),t(e).description!=="undefined"?(v(),_("p",{key:0,innerHTML:t(B)((f=(c=t(e))==null?void 0:c.description)!=null?f:"")},null,8,O)):A("",!0)])])}}});export{ee as default};
