//#region src/components/dynamic-form/hooks/useArrayDefaultValue.ts
var e = (e) => Array.isArray(e) ? e[0] : e, t = (t) => {
	if (!t) return "";
	let n = e(t.type);
	if (n === "object") {
		let n = {};
		return t.properties && Object.entries(t.properties).forEach(([t, r]) => {
			if (r.default !== void 0) n[t] = r.default;
			else switch (e(r.type)) {
				case "string":
					n[t] = "";
					break;
				case "number":
				case "integer":
					n[t] = 0;
					break;
				case "boolean":
					n[t] = !1;
					break;
				case "array":
					n[t] = [];
					break;
				case "object":
					n[t] = {};
					break;
				default: n[t] = "";
			}
		}), n;
	}
	if (n === "array") return [];
	if (t.default !== void 0) return t.default;
	switch (n) {
		case "string": return "";
		case "number":
		case "integer": return 0;
		case "boolean": return !1;
		case "array": return [];
		case "object": return {};
		default: return "";
	}
};
//#endregion
export { t as useArrayDefaultValue };
