"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),r=require("lodash-unified"),m=require("../context.js"),v=require("../utils/get.js"),g=s.defineComponent({name:"ApFormDependency",__name:"index",props:{nameList:{}},setup(a){const i=a,{model:f}=m.useInjectForm(),c=s.ref({});function d(e,l,u){let t=l;for(let n=0;n<e.length;n++){const o=e[n];if(n===e.length-1)t[o]=u;else{const p=e[n+1];(typeof t[o]!="object"||t[o]===null)&&(t[o]=r.isNumber(p)?[]:{}),t=t[o]}}}return s.watchEffect(()=>{const e=r.cloneDeep(c.value);for(const l of i.nameList){const u=[l].flat(1),t=v.getModelValue(s.unref(f),u);d(u,e,t)}c.value=e}),(e,l)=>s.renderSlot(e.$slots,"default",{values:c.value})}});exports.default=g;
