"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;
    },
    get hasModals () {
        return hasModals;
    }
});
/**
 * Взаимодействие с модальными оконами.
 */ const getModals = (items)=>{
    return items.filter((item)=>item?.info?.isModal);
};
const hasModals = (items)=>{
    return getModals(items).length > 0;
};
const getIdLastModal = (items)=>{
    const modals = getModals(items);
    if (!modals.length) {
        return;
    }
    return modals[modals.length - 1].id;
};
const getIdFirstModal = (items)=>{
    const modals = getModals(items);
    if (!modals.length) {
        return;
    }
    return modals[0].id;
};
