import{d as N,t as k,r as l,o as f,c as v,b as r,e as _,u as e,Z as D,a0 as H,H as R,Q as B,g as M}from"../../../../common/index.DXvi0yH9.js";/* empty css                                                                                       *//* empty css                                                                                 */import"../../../../common/Confirmation.vue_vue_type_script_setup_true_lang.BvpajMdU.js";import{_ as T}from"../../../../common/LabelControl.vue_vue_type_script_setup_true_lang.B_b65Eg0.js";import{_ as I}from"../../../../common/Tooltip.vue_vue_type_script_setup_true_lang.BBmniJxI.js";import{_ as L}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 $={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},j={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},q=["id","name","disabled","placeholder","min","max","step"],z=["innerHTML"],E=N({__name:"NumberControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData","previewRef"],setup(b,{emit:x}){var n,m,u;const g=b,{params:h}=k(g),t=h.value,s=l((n=t.default)!=null?n:""),y=l((m=t.step)!=null?m:1),i=l((u=t.disabled)!=null?u:!1),o=x,a=l([]),w=l([]);s.value!==""&&!i.value&&(a.value[t.id]=s.value,o("fieldData",a.value));const C=()=>{a.value[t.id]=s,o("fieldData",a.value),w.value[t.id]=a.value,o("previewRef",w.value)};return(O,d)=>{var p,c;return f(),v("div",null,[r("div",$,[_(e(T),{params:e(t)},null,8,["params"])]),r("div",j,[D(r("input",{"onUpdate:modelValue":d[0]||(d[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:R(["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,q),[[H,s.value]]),_(e(I),{params:e(t)},null,8,["params"])]),e(t).description!=="undefined"?(f(),v("p",{key:0,class:"stwlite-tw-text-sm stwlite-tw-text-gray-600 stwlite-tw-mt-2",innerHTML:e(B)((c=(p=e(t))==null?void 0:p.description)!=null?c:"")},null,8,z)):M("",!0)])}}}),X=L(E,[["__scopeId","data-v-3a58a2b0"]]);export{X as default};
