import type { EntityId, SceneData } from '../core/types';
import { EventBus } from '../core/EventBus';
import { World, type ComponentMap } from '../ecs/World';
export type TransitionType = 'none' | 'fade' | 'slide-left' | 'slide-right' | 'slide-up' | 'slide-down';
export interface SceneTransition {
    type: TransitionType;
    duration: number;
}
export interface SceneConfig {
    id: string;
    name: string;
    /** Factory that populates the world. */
    setup: (world: World) => void | Promise<void>;
    settings?: Record<string, unknown>;
}
export interface PrefabDef {
    name: string;
    tags: string[];
    components: {
        type: keyof ComponentMap;
        overrides?: Record<string, unknown>;
    }[];
    children?: PrefabDef[];
}
export declare class SceneManager {
    readonly events: EventBus;
    private scenes;
    private prefabs;
    private _currentId;
    private _loading;
    private _transition;
    get currentSceneId(): string | null;
    get isLoading(): boolean;
    get transition(): {
        progress: number;
        phase: 'out' | 'in';
    } | null;
    register(config: SceneConfig): void;
    unregister(id: string): void;
    has(id: string): boolean;
    get registeredScenes(): string[];
    loadScene(id: string, world: World, transition?: SceneTransition): Promise<void>;
    /** Reload current scene. */
    reloadScene(world: World): Promise<void>;
    updateTransition(dt: number): void;
    registerPrefab(name: string, prefab: PrefabDef): void;
    /** Instantiate a prefab into the world. Returns the root entity ID. */
    instantiate(world: World, prefabName: string, overrides?: {
        position?: {
            x: number;
            y: number;
        };
        name?: string;
    }): EntityId;
    private instantiatePrefab;
    serializeScene(world: World, id: string, name: string): SceneData;
    /** Deserialize a scene into a world. */
    deserializeScene(world: World, data: SceneData): void;
}
