"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Entity = void 0;
const node_events_1 = __importDefault(require("node:events"));
class Entity extends node_events_1.default.EventEmitter {
    static databases = new Map();
    static adapters = new Map();
    static injectDatabase(database) {
        Entity.databases.set(database.id, database);
    }
    static injectAdapter(databaseID, adapter) {
        Entity.adapters.set(databaseID, adapter);
    }
    static removeDatabase(databaseID) {
        Entity.databases.delete(databaseID);
    }
    static removeAdapter(databaseID) {
        Entity.adapters.delete(databaseID);
    }
    static getAdapterByID(id) {
        return Entity.adapters.get(id);
    }
    static databaseIDExists(id) {
        return Entity.databases.get(id) !== undefined;
    }
    static getDatabaseByID(id) {
        return Entity.databases.get(id);
    }
}
exports.Entity = Entity;
exports.default = Entity;
//# sourceMappingURL=entity.js.map