import{d as k,t as D,r as l,o as f,c as _,b as o,e as v,u as e,Z as H,a0 as B,H as M,Q as N,g as T}from"../../../../common/index.DXvi0yH9.js";/* empty css                                                                                       *//* empty css                                                                                 */import"../../../../common/Confirmation.vue_vue_type_script_setup_true_lang.BvpajMdU.js";import{_ as I}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.B_b65Eg0.js";import{_ as L}from"../../../../common/Tooltip.vue_vue_type_script_setup_true_lang.BBmniJxI.js";import{_ as O}from"../../../../common/_plugin-vue_export-helper.DlAUqK2U.js";import"../../../../common/transition.CRNcmuQX.js";import"../../../../common/keyboard.D4P2wQc7.js";import"../../../../common/open-closed.CQX5sZkx.js";import"../../../../common/micro-task.CxIZtCgj.js";const P={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},$={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},j=["id","name","disabled","placeholder","min","max","step"],q=["innerHTML"],z=k({__name:"PercentControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(b,{emit:x}){var n,w,m;const g=b,{params:h}=D(g),t=h.value,s=l((n=t.default)!=null?n:""),y=l((w=t.step)!=null?w:1),i=l((m=t.disabled)!=null?m:!1),r=x,a=l([]);s.value!==""&&!i.value&&(a.value[t.id]=s.value+"%",r("fieldData",a.value));const C=d=>{a.value[t.id]=d+"%",r("fieldData",a.value)};return(d,p)=>{var c,u;return f(),_("div",null,[o("div",P,[v(e(I),{params:e(t)},null,8,["params"])]),o("div",$,[H(o("input",{"onUpdate:modelValue":p[0]||(p[0]=V=>s.value=V),id:e(t).id,name:e(t).id,disabled:i.value,placeholder:e(t).placeholder,type:"number",onInput:C,min:e(t).min,max:e(t).max,step:y.value,class:M(["stwlite-tw-block stwlite-tw-w-full stwlite-tw-max-w-xs stwlite-tw-px-3 stwlite-tw-py-2 stwlite-tw-border stwlite-tw-border-gray-300 stwlite-tw-rounded-md stwlite-tw-shadow-sm stwlite-tw-placeholder-gray-400 focus:stwlite-tw-outline-none focus:stwlite-tw-ring-2 focus:stwlite-tw-ring-blue-500 focus:stwlite-tw-border-blue-500",i.value?"stwlite-tw-bg-gray-100 stwlite-tw-text-gray-500 stwlite-tw-cursor-not-allowed":"stwlite-tw-bg-white stwlite-tw-text-gray-900"])},null,42,j),[[B,s.value]]),v(e(L),{params:e(t)},null,8,["params"])]),e(t).description!=="undefined"?(f(),_("p",{key:0,class:"stwlite-tw-text-sm stwlite-tw-text-gray-600 stwlite-tw-mt-2",innerHTML:e(N)((u=(c=e(t))==null?void 0:c.description)!=null?u:"")},null,8,q)):T("",!0)])}}}),W=O(z,[["__scopeId","data-v-c93bab21"]]);export{W as default};
