"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get getIdFirstModal () {
        return getIdFirstModal;
    },
    get getIdLastModal () {
        return getIdLastModal;
    }
});
/**
 * Взаимодействие с модальными оконами.
 */ var getModals = function getModals(items) {
    return items.filter(function(item) {
        var _item_info;
        return item === null || item === void 0 ? void 0 : (_item_info = item.info) === null || _item_info === void 0 ? void 0 : _item_info.isModal;
    });
};
var getIdLastModal = function getIdLastModal(items) {
    var modals = getModals(items);
    if (!modals.length) {
        return;
    }
    return modals[modals.length - 1].id;
};
var getIdFirstModal = function getIdFirstModal(items) {
    var modals = getModals(items);
    if (!modals.length) {
        return;
    }
    return modals[0].id;
};
