import type { EntityId } from '../core/types';
import { World } from '../ecs/World';
export interface ProfilerSample {
    label: string;
    startMs: number;
    endMs: number;
    durationMs: number;
}
export interface ProfilerFrame {
    frameIndex: number;
    totalMs: number;
    samples: ProfilerSample[];
}
export declare class Profiler {
    private frames;
    private currentFrame;
    private _pending;
    private _frameIndex;
    readonly maxFrames: number;
    constructor(maxFrames?: number);
    beginFrame(): void;
    begin(label: string): void;
    end(): void;
    endFrame(): void;
    getFrames(): ReadonlyArray<ProfilerFrame>;
    getAverage(label: string): number;
    getLastFrame(): ProfilerFrame | null;
    clear(): void;
}
export declare class FPSCounter {
    private times;
    private _fps;
    get fps(): number;
    tick(now?: number): void;
}
export type LogLevel = 'info' | 'warn' | 'error' | 'debug';
export interface LogEntry {
    level: LogLevel;
    message: string;
    timestamp: number;
    count: number;
}
export declare class ConsoleLogger {
    private _entries;
    readonly maxEntries: number;
    private _onChange?;
    constructor(maxEntries?: number);
    set onChange(cb: (() => void) | undefined);
    get entries(): ReadonlyArray<LogEntry>;
    log(message: string): void;
    warn(message: string): void;
    error(message: string): void;
    debug(message: string): void;
    private add;
    clear(): void;
    filtered(levels: LogLevel[]): LogEntry[];
}
export interface EntitySnapshot {
    id: EntityId;
    name: string;
    tags: string[];
    enabled: boolean;
    components: Record<string, Record<string, unknown>>;
}
export declare function snapshotEntity(world: World, id: EntityId): EntitySnapshot | null;
export declare function snapshotWorld(world: World): EntitySnapshot[];
export declare function renderCollisionDebug(ctx: CanvasRenderingContext2D, world: World): void;
export interface MemoryStats {
    entityCount: number;
    systemCount: number;
    jsHeapUsed: number | null;
    jsHeapTotal: number | null;
}
export declare function getMemoryStats(world: World): MemoryStats;
