import React from 'react';
import type { GameProject, EntityId } from '../core/types';
import { EventBus } from '../core/EventBus';
import { World, type ComponentMap } from '../ecs/World';
import { SceneManager } from '../scene/SceneManager';
export interface UndoEntry {
    description: string;
    undo: () => void;
    redo: () => void;
}
export declare class UndoStack {
    private stack;
    private pointer;
    readonly maxSize: number;
    readonly events: EventBus;
    constructor(maxSize?: number);
    push(entry: UndoEntry): void;
    undo(): string | null;
    redo(): string | null;
    get canUndo(): boolean;
    get canRedo(): boolean;
    clear(): void;
}
export type EditorTool = 'select' | 'move' | 'rotate' | 'scale' | 'pan';
export type EditorMode = 'edit' | 'play' | 'pause';
export interface EditorPanel {
    id: string;
    title: string;
    visible: boolean;
    position: 'left' | 'right' | 'bottom' | 'floating';
    width?: number;
    height?: number;
}
export interface EditorState {
    mode: EditorMode;
    tool: EditorTool;
    selectedEntities: EntityId[];
    clipboard: EntityId[];
    gridSize: number;
    snapToGrid: boolean;
    showGrid: boolean;
    showRulers: boolean;
    zoom: number;
    panOffset: {
        x: number;
        y: number;
    };
    panels: EditorPanel[];
    currentSceneId: string | null;
    projectPath: string | null;
    dirty: boolean;
}
type EditorAction = {
    type: 'SET_MODE';
    mode: EditorMode;
} | {
    type: 'SET_TOOL';
    tool: EditorTool;
} | {
    type: 'SELECT';
    entities: EntityId[];
} | {
    type: 'ADD_SELECTION';
    entities: EntityId[];
} | {
    type: 'DESELECT_ALL';
} | {
    type: 'SET_CLIPBOARD';
    entities: EntityId[];
} | {
    type: 'SET_GRID_SIZE';
    size: number;
} | {
    type: 'TOGGLE_SNAP';
} | {
    type: 'TOGGLE_GRID';
} | {
    type: 'SET_ZOOM';
    zoom: number;
} | {
    type: 'SET_PAN';
    offset: {
        x: number;
        y: number;
    };
} | {
    type: 'TOGGLE_PANEL';
    panelId: string;
} | {
    type: 'SET_SCENE';
    sceneId: string | null;
} | {
    type: 'MARK_DIRTY';
} | {
    type: 'MARK_CLEAN';
};
export interface ConsoleEntry {
    id: number;
    level: 'info' | 'warn' | 'error';
    message: string;
    timestamp: number;
}
export interface EditorContextValue {
    state: EditorState;
    dispatch: React.Dispatch<EditorAction>;
    world: World;
    undoStack: UndoStack;
    sceneManager: SceneManager;
    events: EventBus;
    worldVersion: number;
    refreshWorld: () => void;
    createNewEntity: (name: string, components?: (keyof ComponentMap)[]) => number;
    consoleLogs: ConsoleEntry[];
    addLog: (level: ConsoleEntry['level'], message: string) => void;
}
export declare function useEditor(): EditorContextValue;
export declare function serializeProject(project: GameProject): string;
export declare function deserializeProject(json: string): GameProject;
export interface NiceGameEditorProps {
    project?: GameProject;
    onSave?: (project: GameProject) => void;
    className?: string;
    style?: React.CSSProperties;
}
export declare const NiceGameEditor: React.FC<NiceGameEditorProps>;
export {};
