"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),r=require("@aplus-frontend/utils"),o=require("lodash-unified"),f=require("../../ap-form/context.js"),p=require("../../ap-form/utils/get.js");require("../../ap-form/item/index.vue2.js");require("./index.vue2.js");const c=require("../../ap-form/item/index.vue.js"),m=require("./index.vue.js"),v=l.defineComponent({name:"ApFormItemBatchInputGroup",__name:"form-item",props:{htmlFor:{},prefixCls:{},label:{},help:{},extra:{},labelCol:{},wrapperCol:{},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:{},prop:{},name:{},rules:{},autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:{},validateTrigger:{},messageVariables:{},hidden:{type:Boolean},noStyle:{type:Boolean},tooltip:{},span:{},order:{},offset:{},push:{},pull:{},xs:{},sm:{},md:{},lg:{},xl:{},xxl:{},flex:{},bordered:{type:Boolean,default:!1},valuePropName:{},initialValue:{},_signal:{},transform:{},description:{},customFilled:{},disabled:{type:Boolean,default:void 0},autoFocus:{type:Boolean},field:{default:()=>({})},placeholer:{},trim:{type:Boolean,default:!0},defaultSelectedAllKey:{type:Boolean}},setup(i){const e=i,{internalInstance:n}=f.useInjectForm(),u=l.computed(()=>e?.transform||{flat:!1,transformer:a=>{if(a)return!a?.value||a?.value?.length<1?void 0:e?.field?.options?{...a,value:a?.value?.filter(t=>r.isValid(t?.trim()))?.map(t=>e.trim?t?.trim():t)}:a?.value?.filter(t=>r.isValid(t?.trim()))?.map(t=>e.trim?t?.trim():t)}}),s=l.computed(()=>e.field?.style||"width:auto"),d=l.computed(()=>{if(e.initialValue)return e.initialValue;const a=n?.getInitialValues();if(!p.getModelValue(a,e.name))return e.field.hasAll===!1?{key:[e?.field?.options?.[0]?.value]}:{key:e?.field?.options?.map(t=>t.value)}});return(a,t)=>(l.openBlock(),l.createBlock(c.default,l.mergeProps(l.unref(o.omit)(e,["field","initialValue","transform","placeholder","disabled"]),{"initial-value":d.value,transform:u.value,bordered:i.field?.options?.length?!1:i.bordered}),{default:l.withCtx(()=>[l.createVNode(m.default,l.mergeProps(l.unref(o.omit)(e.field,["style"]),{style:s.value,disabled:i.disabled,placeholer:i.placeholer}),null,16,["style","disabled","placeholer"])]),_:1},16,["initial-value","transform","bordered"]))}});exports.default=v;
