"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.removeUserFromOlineList = void 0;
const usersSocket = require("../libs/socket");
const removeUserFromOlineList = (userId) => {
    var _a, _b, _c, _d, _e, _f, _g, _h;
    let index = (_b = (_a = usersSocket === null || usersSocket === void 0 ? void 0 : usersSocket.ob) === null || _a === void 0 ? void 0 : _a.listOnline) === null || _b === void 0 ? void 0 : _b.findIndex((o) => (o === null || o === void 0 ? void 0 : o.id) == userId);
    if (index != -1) {
        (_d = (_c = usersSocket === null || usersSocket === void 0 ? void 0 : usersSocket.ob) === null || _c === void 0 ? void 0 : _c.listOnline) === null || _d === void 0 ? void 0 : _d.splice(index, 1);
    }
    index = -1;
    index = (_f = (_e = usersSocket === null || usersSocket === void 0 ? void 0 : usersSocket.ob) === null || _e === void 0 ? void 0 : _e.listOnlineAux) === null || _f === void 0 ? void 0 : _f.findIndex((o) => (o === null || o === void 0 ? void 0 : o.id) == userId);
    if (index != -1) {
        (_h = (_g = usersSocket === null || usersSocket === void 0 ? void 0 : usersSocket.ob) === null || _g === void 0 ? void 0 : _g.listOnlineAux) === null || _h === void 0 ? void 0 : _h.splice(index, 1);
    }
};
exports.removeUserFromOlineList = removeUserFromOlineList;
