import { defineComponent as s, useSlots as d, inject as m, computed as p, ref as c, watch as i } from "vue";
import { SymbolState as f } from "../symbol.mjs";
import { wetFormItemDependencyProps as y } from "../types.mjs";
const C = s({
  name: "WetFormDependency",
  props: y,
  setup(t) {
    const n = d(), {
      setFieldsValue: l,
      getFieldsValue: r
    } = m(f), a = p(() => {
      if (t.relyprops.length === 0)
        return [];
      const e = [];
      return t.relyprops.forEach((u) => {
        e.push(r(u));
      }), t.relyprops.length > 1 ? e : e[0];
    }), o = c({});
    return i(a, (e) => {
      e !== void 0 && t.dependencyChange && (o.value = t.dependencyChange({
        relyValues: e,
        setValue: l,
        getValue: r
      }));
    }, {
      immediate: !0,
      deep: !0
    }), () => n.default && n.default({
      relyValue: a.value,
      setValue: l,
      getValue: r,
      parames: o.value
    });
  }
});
export {
  C as default
};
