"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 оконами.
 */ const getDrawers = (items)=>{
    return items.filter((item)=>item?.info?.isDrawer);
};
const hasDrawers = (items)=>{
    return getDrawers(items).length > 0;
};
const getIdLastDrawer = (items)=>{
    const drawers = getDrawers(items);
    if (!drawers.length) {
        return;
    }
    return drawers[drawers.length - 1].id;
};
const getIdFirstDrawer = (items)=>{
    const drawers = getDrawers(items);
    if (!drawers.length) {
        return;
    }
    return drawers[0].id;
};
