import { inject as e, ref as t, unref as n } from "vue";
//#region src/pages/flow-create/flow-model/createComponents/step4/components/utils.ts
function r() {
	return a(n(e("formFields", t([]))));
}
function i() {
	let r = a(n(e("formFields", t([]))));
	return r.unshift({
		field: "PROCESS_START_USER_ID",
		title: "发起人",
		required: !0
	}), r;
}
function a(e) {
	let t = [];
	return e && e.forEach((e) => {
		o(JSON.parse(e), t);
	}), t;
}
function o(e, t = [], n = "") {
	let { type: r, field: i, $required: a, title: s, children: c } = e;
	if (i && s) {
		let e = s;
		n && (e = `${n}.${s}`);
		let o = !1;
		a && (o = !0), t.push({
			field: i,
			title: e,
			type: r,
			required: o
		});
	}
	c && Array.isArray(c) && c.forEach((e) => {
		o(e, t);
	});
}
//#endregion
export { i as n, r as t };
