import { EventSubscriber } from '@a-type/utils'; import { Archetype } from './Archetype.js'; import { ComponentInstance, ComponentInstanceInternal } from './Component2.js'; import { Game } from './Game.js'; export type ArchetypeManagerEvents = { archetypeCreated(archetype: Archetype): void; entityCreated(entityId: number): void; entityComponentAdded(entityId: number, component: ComponentInstance): void; entityComponentRemoved(entityId: number, componentType: number): void; entityDestroyed(entityId: number): void; }; export declare class ArchetypeManager extends EventSubscriber { private game; emptyId: string; entityLookup: (string | undefined)[]; archetypes: Record; constructor(game: Game); private lookupEntityArchetype; private setEntityArchetype; private clearEntityArchetype; createEntity(entityId: number): void; addComponent(entityId: number, instance: ComponentInstanceInternal): void; removeComponent(entityId: number, componentType: number): ComponentInstanceInternal | undefined; removeEntity(entityId: number): import("./Entity.js").Entity; getEntity(entityId: number): import("./Entity.js").Entity | null; private getOrCreate; private flipBit; }