/**
 * Compares two sets of string IDs and checks if they are identical.
 *
 * Two sets are considered identical if they have the same size and
 * contain exactly the same elements, regardless of order.
 *
 * @param {Set<string>} a - The first set of string IDs.
 * @param {Set<string>} b - The second set of string IDs.
 * @returns {boolean} True if both sets are identical, false otherwise.
 */
const areSetsEqual = (a, b) => {
    if (a.size !== b.size)
        return false;
    for (const value of a) {
        if (!b.has(value))
            return false;
    }
    return true;
};

/**
 * WA: Ignored objects must always remain unchecked.
 * Because `tabular-grid` selects all rows when the checkbox column is toggled,
 * we need to manually unselect the ignored IDs.
 *
 * @param ignoredIds - Row IDs that must never be selected.
 * @param tabularGridRef - Reference to the tabular-grid instance.
 *
 * TODO: Use the tabular grid render once available, and hopefully do not
 * add a checkbox to the ignored objects rows.
 */
const uncheckIgnoredObjects = async (ignoredIds, tabularGridRef) => {
    for (const ignoredId of ignoredIds) {
        await tabularGridRef.markRow(ignoredId, false);
    }
};

export { areSetsEqual as a, uncheckIgnoredObjects as u };

//# sourceMappingURL=uncheck-ignored-4ba48c9e.js.map