/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-e694c50 | Cube Dev Team */
//#region src/utils/selection.ts
/**
* Deduplicate/toggle keys in a selection: if a key appears twice it is
* removed (toggled off), otherwise it is kept (selected).
*/
function processSelectionArray(iterable) {
	const resultSet = /* @__PURE__ */ new Set();
	for (const key of iterable) {
		const nKey = String(key);
		if (resultSet.has(nKey)) resultSet.delete(nKey);
		else resultSet.add(nKey);
	}
	return Array.from(resultSet);
}

//#endregion
export { processSelectionArray };
//# sourceMappingURL=selection.js.map