"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),h=require("@aplus-frontend/antdv");require("../../ap-field/number/index.vue2.js");require("../../config-provider/index.js");const m=require("./constans.js"),g=require("./style/index.js"),v=require("../../config-provider/hooks/use-namespace.js"),p=require("../../config-provider/hooks/use-locale.js"),i=require("../../ap-field/number/index.vue.js"),f=t.defineComponent({name:"ApSizeInput",props:m.ApSizeInputProps(),setup(e,{emit:r}){const{b:d}=v.useNamespace("ap-size-input"),o=g.default("ap-size-input"),{t:n}=p.useLocale(),s=h.Form.useInjectFormItemContext(),u=(l,a)=>{const c=e.value||[];c[l]=a,r("update:value",c),r("SizeInputChange",t.toRaw(c)),s.onFieldChange()};return()=>{const l={style:{flex:1},precision:e.precision??2,min:e.min??1,max:e.max,step:e.step??1,mode:e.editable?"edit":"read",disabled:e.disabled};return t.createVNode("div",{class:[d(),o.value],style:e.style},[t.createVNode(i.default,t.mergeProps({value:e.value?.[0],placeholder:e.placeholder&&e.placeholder.length>=3?e.placeholder[0]:n("ap.apSizeInput.length"),onChange:a=>u(0,a)},l),null),e.perfix,t.createVNode(i.default,t.mergeProps({value:e.value?.[1],placeholder:e.placeholder&&e.placeholder.length>=3?e.placeholder[1]:n("ap.apSizeInput.width"),onChange:a=>u(1,a)},l),null),e.perfix,t.createVNode(i.default,t.mergeProps({value:e.value?.[2],placeholder:e.placeholder&&e.placeholder.length>=3?e.placeholder[2]:n("ap.apSizeInput.height"),onChange:a=>u(2,a)},l),null)])}}});exports.default=f;
