"use client";
//#region packages/@mantine/core/src/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.ts
function parseItem(item) {
	if (typeof item === "string") return {
		value: item,
		label: item
	};
	if (typeof item === "object" && "value" in item && !("label" in item)) return {
		value: item.value,
		label: `${item.value}`,
		disabled: item.disabled
	};
	if (typeof item === "object" && "group" in item) return {
		group: item.group,
		items: item.items.map((i) => parseItem(i))
	};
	if (typeof item === "number" || typeof item === "bigint" || typeof item === "boolean") return {
		value: item,
		label: `${item}`
	};
	return item;
}
function getParsedComboboxData(data) {
	if (!data) return [];
	return data.map((item) => parseItem(item));
}
//#endregion
export { getParsedComboboxData };

//# sourceMappingURL=get-parsed-combobox-data.mjs.map