import { PackageManager } from "../package-manager";
import { ProcessManager } from "../process-manager";
import { ViewManager } from "../view-manager";
import { FilesystemManager } from "../filesystem";
import { IPCBridge, CommandRegistry, EdenEmitter } from "../ipc";
import type { FileOpenResult, FileHandlerInfo } from "@edenapp/types";
/**
 * Events emitted by the FileOpenManager
 */
interface FileNamespaceEvents {
    opened: {
        path: string;
        isDirectory: boolean;
        appId: string;
    };
}
/**
 * FileOpenManager
 *
 * Manages file type associations and handles opening files with appropriate applications.
 */
export declare class FileOpenManager extends EdenEmitter<FileNamespaceEvents> {
    private packageManager;
    private processManager;
    private viewManager;
    private fsManager;
    private userDirectory;
    private preferencesPath;
    private fileOpenHandler;
    private defaultRegistry;
    private userPreferences;
    private static readonly DIRECTORY_KEY;
    constructor(userDirectory: string, packageManager: PackageManager, processManager: ProcessManager, viewManager: ViewManager, fsManager: FilesystemManager, ipcBridge: IPCBridge, commandRegistry: CommandRegistry);
    /**
     * Initialize with user preferences loaded from disk
     */
    initialize(): Promise<void>;
    /**
     * Set up built-in default handlers
     */
    private initializeDefaultRegistry;
    /**
     * Load user preferences from disk
     */
    private loadUserPreferences;
    /**
     * Save user preferences to disk
     */
    private saveUserPreferences;
    /**
     * Get the file extension from a path (lowercase, without dot)
     */
    private getExtension;
    /**
     * Get the handler app ID for a file path
     */
    getHandler(filePath: string, isDirectory?: boolean): string | undefined;
    /**
     * Get handler for a specific extension
     */
    getHandlerForExtension(extension: string): string | undefined;
    /**
     * Set user preference for a file extension
     */
    setDefaultHandler(extension: string, appId: string): Promise<void>;
    /**
     * Remove user preference for a file extension (revert to default)
     */
    removeDefaultHandler(extension: string): Promise<void>;
    /**
     * Get all apps that can handle a specific extension
     */
    getSupportedHandlers(extension: string): FileHandlerInfo[];
    /**
     * Get all file type associations
     */
    getAllAssociations(): Record<string, {
        default: string | undefined;
        userOverride: string | undefined;
    }>;
    /**
     * Open a file with its default handler
     */
    openFile(filePath: string): Promise<FileOpenResult>;
    /**
     * Open a file with a specific app
     */
    openFileWith(filePath: string, appId: string): Promise<FileOpenResult>;
}
export {};
//# sourceMappingURL=FileOpenManager.d.ts.map