/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
import{FieldApi as t}from"../../../form-core/dist/esm/FieldApi.js";import{useStore as e}from"../../../vue-store/dist/esm/index.js";import{defineComponent as r,onMounted as o,onUnmounted as s,watch as m}from"vue";function i(r){const i=(()=>{const e=new t({...r,form:r.form,name:r.name});return e.Field=n,e})(),a=e(i.store,t=>t);let f;return o(()=>{f=i.mount()}),s(()=>{f()}),m(()=>r,()=>{i.update({...r,form:r.form})}),{api:i,state:a}}const n=r((t,e)=>{const r=i({...t,...e.attrs});return()=>e.slots.default({field:r.api,state:r.state.value})},{name:"Field",inheritAttrs:!1});export{n as Field,i as useField};