import { EventBus } from '../core/EventBus';
export type ModuleState = 'loaded' | 'updating' | 'error' | 'disposed';
export interface HMRModule {
    id: string;
    path: string;
    state: ModuleState;
    version: number;
    /** The current module exports object. */
    exports: Record<string, unknown>;
    /** Timestamp of last update. */
    lastUpdated: number;
    /** Dependencies this module depends on. */
    dependencies: string[];
    /** Modules that depend on this one. */
    dependents: string[];
}
export interface HMRUpdate {
    moduleId: string;
    previousVersion: number;
    newVersion: number;
    /** State to preserve across hot reload. */
    preservedState?: Record<string, unknown>;
    timestamp: number;
}
export type HMRAcceptCallback = (newModule: Record<string, unknown>) => void;
export type HMRDisposeCallback = (data: Record<string, unknown>) => void;
export declare class HotModuleReplacer {
    readonly events: EventBus;
    private modules;
    private acceptCallbacks;
    private disposeCallbacks;
    private updateHistory;
    private maxHistory;
    /** Register a module with the HMR system. */
    register(id: string, path: string, exports: Record<string, unknown>, dependencies?: string[]): void;
    /** Register an accept handler — called when the module is hot-replaced. */
    accept(moduleId: string, callback: HMRAcceptCallback): void;
    /** Register a dispose handler — called before the module is replaced. */
    dispose(moduleId: string, callback: HMRDisposeCallback): void;
    /**
     * Hot-replace a module with new exports.
     * Calls dispose callbacks, updates the module, then calls accept callbacks.
     */
    update(moduleId: string, newExports: Record<string, unknown>): boolean;
    /** Get a module by ID. */
    getModule(id: string): HMRModule | undefined;
    /** Get all registered modules. */
    get allModules(): HMRModule[];
    /** Get update history. */
    get history(): readonly HMRUpdate[];
    /** Remove a module from HMR tracking. */
    unregister(moduleId: string): void;
}
export type AssetType = 'image' | 'audio' | 'font' | 'json' | 'tilemap' | 'script' | 'shader' | 'model' | 'unknown';
export interface AssetMeta {
    id: string;
    name: string;
    type: AssetType;
    mimeType: string;
    sizeBytes: number;
    /** Original filename. */
    originalName: string;
    /** Processed / optimized data URL or blob URL. */
    url: string;
    /** Dimensions for images. */
    width?: number;
    height?: number;
    /** Duration in seconds for audio. */
    duration?: number;
    /** Import timestamp. */
    importedAt: number;
    /** Tags for asset management. */
    tags: string[];
}
export interface AssetProcessorOptions {
    /** Max image dimension (resizes if larger). Default: 2048. */
    maxImageDimension: number;
    /** Image quality for JPEG/WebP (0-1). Default: 0.85. */
    imageQuality: number;
    /** Preferred output format for images. Default: 'webp'. */
    preferredImageFormat: 'png' | 'webp' | 'jpeg';
    /** Whether to generate thumbnail previews. Default: true. */
    generateThumbnails: boolean;
    /** Thumbnail size. Default: 128. */
    thumbnailSize: number;
}
export declare class AssetPipeline {
    readonly events: EventBus;
    private assets;
    private options;
    private nextId;
    constructor(options?: Partial<AssetProcessorOptions>);
    /**
     * Import a file (e.g., from drag & drop or file input).
     * Processes and optimizes the asset based on its type.
     */
    importFile(file: File): Promise<AssetMeta>;
    /** Import multiple files at once. */
    importFiles(files: FileList | File[]): Promise<AssetMeta[]>;
    /** Setup drag & drop on an HTML element. */
    setupDropZone(element: HTMLElement): () => void;
    /** Get an asset by ID. */
    getAsset(id: string): AssetMeta | undefined;
    /** Get all assets. */
    getAllAssets(): AssetMeta[];
    /** Get assets by type. */
    getAssetsByType(type: AssetType): AssetMeta[];
    /** Remove an asset. */
    removeAsset(id: string): void;
    /** Tag an asset. */
    tagAsset(id: string, tag: string): void;
    private detectType;
    private sanitizeFilename;
    private readFileAsDataURL;
    private getImageDimensions;
    private resizeImage;
}
export type DeployTarget = 'web' | 'pwa' | 'electron' | 'capacitor' | 'docker';
export interface DeployConfig {
    target: DeployTarget;
    /** App display name. */
    appName: string;
    /** App version (semver). */
    version: string;
    /** App description. */
    description: string;
    /** App icon path (relative). */
    iconPath?: string;
    /** PWA-specific: start URL. */
    startUrl?: string;
    /** PWA-specific: theme color. */
    themeColor?: string;
    /** PWA-specific: background color. */
    backgroundColor?: string;
    /** Electron-specific: window dimensions. */
    windowWidth?: number;
    windowHeight?: number;
    /** Capacitor-specific: bundle ID. */
    bundleId?: string;
    /** Whether to minify output. */
    minify?: boolean;
    /** Whether to generate source maps. */
    sourceMaps?: boolean;
    /** Custom environment variables. */
    env?: Record<string, string>;
}
export interface DeployResult {
    target: DeployTarget;
    success: boolean;
    outputPath?: string;
    /** Generated files list. */
    files: string[];
    /** Total output size in bytes. */
    totalSizeBytes: number;
    /** Build duration in ms. */
    buildDurationMs: number;
    errors: string[];
    warnings: string[];
}
export declare class DeployManager {
    readonly events: EventBus;
    /** Generate PWA manifest JSON. */
    generatePWAManifest(config: DeployConfig): string;
    /** Generate service worker registration code. */
    generateServiceWorkerScript(): string;
    /** Generate Electron main process entry. */
    generateElectronMain(config: DeployConfig): string;
    /** Generate Capacitor config. */
    generateCapacitorConfig(config: DeployConfig): string;
    /** Generate Dockerfile for containerized deployment. */
    generateDockerfile(): string;
    /** Generate deployment package.json scripts. */
    generateDeployScripts(config: DeployConfig): Record<string, string>;
    /** Estimate output size based on input assets. */
    estimateOutputSize(assets: Array<{
        sizeBytes: number;
    }>, minify: boolean): number;
}
export interface CollaboratorCursor {
    peerId: string;
    displayName: string;
    color: string;
    /** Current position in the editor (line, column). */
    position: {
        line: number;
        column: number;
    };
    /** Currently editing file/path. */
    filePath: string;
    /** Selection range (if any). */
    selection?: {
        startLine: number;
        startCol: number;
        endLine: number;
        endCol: number;
    };
    /** Time of last update. */
    lastSeen: number;
}
export declare class CollaborationManager {
    readonly events: EventBus;
    private cursors;
    private localPeerId;
    private colorIndex;
    private staleTimeoutMs;
    constructor(localPeerId: string);
    /** Update a remote cursor position. */
    updateCursor(peerId: string, data: Omit<CollaboratorCursor, 'color' | 'lastSeen'>): void;
    /** Remove a collaborator. */
    removeCursor(peerId: string): void;
    /** Get all active cursors (excluding stale ones). */
    getActiveCursors(): CollaboratorCursor[];
    /** Get cursors in a specific file. */
    getCursorsInFile(filePath: string): CollaboratorCursor[];
    /** Number of active collaborators. */
    get activeCount(): number;
}
