"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function addElementToHashTable(hash, realElement, virtualElement) {
    if (virtualElement && virtualElement.attributes) {
        var flexId = virtualElement.attributes['haiku-id'] || virtualElement.attributes.id;
        if (flexId) {
            if (!hash[flexId]) {
                hash[flexId] = [];
            }
            var alreadyInList = false;
            for (var i = 0; i < hash[flexId].length; i++) {
                var elInList = hash[flexId][i];
                if (elInList === realElement) {
                    alreadyInList = true;
                }
            }
            if (!alreadyInList) {
                hash[flexId].push(realElement);
            }
        }
    }
}
exports.default = addElementToHashTable;
//# sourceMappingURL=addElementToHashTable.js.map