import { isVNode as u, createVNode as i } from "vue";
import { omit as c } from "lodash-unified";
import "../../ap-form/index.mjs";
import { getEditableComponent as a } from "../../editable-table/utils.mjs";
import d from "../../ap-form/item/index.vue.mjs";
function m(e) {
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !u(e);
}
function C(e, t, n, l) {
  if (e.customRenderFormItem) {
    const r = e.customRenderFormItem(e, t.field, !0, n);
    return i(d, c(t, ["field"]), m(r) ? r : {
      default: () => [r]
    });
  }
  const f = a(e.valueType);
  if (f)
    return i(f, t, null);
  const o = l?.[e.valueType]?.renderFormItem?.(t.field);
  return o ? i(d, t, m(o) ? o : {
    default: () => [o]
  }) : null;
}
export {
  C as getFinalEditableNode
};
