"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uniqueElementReferenceSet = uniqueElementReferenceSet;
const types_1 = require("../../types");
function uniqueElementReferenceSet(elements) {
    const result = new Set();
    const ids = new Set();
    for (const element of elements) {
        const id = element[types_1.MOBILE_ELEMENT_IDENTIFIER_PROPERTY];
        if (!ids.has(id)) {
            ids.add(id);
            result.add(element);
        }
    }
    return result;
}
