"use client";
const require_is_options_group = require("../Combobox/OptionsDropdown/is-options-group.cjs");
//#region packages/@mantine/core/src/components/MultiSelect/filter-picked-values.ts
function normalizeValue(value) {
	return typeof value === "string" ? value.trim().toLowerCase() : value;
}
function filterPickedValues({ data, value }) {
	const normalizedValue = value.map(normalizeValue);
	return data.reduce((acc, item) => {
		if (require_is_options_group.isOptionsGroup(item)) acc.push({
			group: item.group,
			items: item.items.filter((option) => normalizedValue.indexOf(normalizeValue(option.value)) === -1)
		});
		else if (normalizedValue.indexOf(normalizeValue(item.value)) === -1) acc.push(item);
		return acc;
	}, []);
}
//#endregion
exports.filterPickedValues = filterPickedValues;

//# sourceMappingURL=filter-picked-values.cjs.map