"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("lodash-unified"),n=require("vue"),o=require("../../utils/is.js"),s=require("../context.js"),l=e=>{let t=!1;const{internalInstance:r}=s.useInjectForm();n.onMounted(()=>{u()}),n.onBeforeUnmount(()=>{t=!0});async function u(){let i=a.isFunction(e.initialValue)?e.initialValue():e.initialValue;o.isPromise(i)&&(i=await i),!t&&r?.registerField({name:e.name,initialValue:i,transform:e.transform})}};exports.default=l;
