"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 getIdFirstDrawer () {
        return getIdFirstDrawer;
    },
    get getIdLastDrawer () {
        return getIdLastDrawer;
    },
    get hasDrawers () {
        return hasDrawers;
    }
});
/**
 * Взаимодействие с Drawer оконами.
 */ var getDrawers = function getDrawers(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.isDrawer;
    });
};
var hasDrawers = function hasDrawers(items) {
    return getDrawers(items).length > 0;
};
var getIdLastDrawer = function getIdLastDrawer(items) {
    var drawers = getDrawers(items);
    if (!drawers.length) {
        return;
    }
    return drawers[drawers.length - 1].id;
};
var getIdFirstDrawer = function getIdFirstDrawer(items) {
    var drawers = getDrawers(items);
    if (!drawers.length) {
        return;
    }
    return drawers[0].id;
};
