import { ViewManager } from "../view-manager/ViewManager";
import { BackendManager } from "../process-manager/BackendManager";
import { PermissionRegistry } from "./PermissionRegistry";
import { EventName, EventData } from "@edenapp/types";
export declare class EventSubscriberManager {
    private viewManager;
    private backendManager?;
    private subscriptions;
    private backendSubscriptions;
    private internalSubscriptions;
    private permissionRegistry?;
    constructor(viewManager: ViewManager);
    /**
     * Set the backend manager for backend notifications
     */
    setBackendManager(backendManager: BackendManager): void;
    /**
     * Set the permission registry for permission checking
     */
    setPermissionRegistry(registry: PermissionRegistry): void;
    /**
     * Subscribe a view to an event
     */
    subscribe(viewId: number, eventName: string): boolean;
    /**
     * Subscribe a backend to an event
     */
    subscribeBackend(appId: string, eventName: string): boolean;
    /**
     * Subscribe an internal callback (for managers) to an event
     * Unlike view subscriptions, these are in-process callbacks
     */
    subscribeInternal<T extends EventName>(event: T, callback: (data: EventData<T>) => void): void;
    /**
     * Unsubscribe a view from an event
     */
    unsubscribe(viewId: number, eventName: string): boolean;
    /**
     * Unsubscribe a backend from an event
     */
    unsubscribeBackend(appId: string, eventName: string): boolean;
    /**
     * Get all views subscribed to an event
     */
    getSubscribedViews(eventName: string): number[];
    /**
     * Get all backends subscribed to an event
     */
    getSubscribedBackends(eventName: string): string[];
    /**
     * Send event only to subscribed views, backends, and internal callbacks
     */
    notify(eventName: string, payload: any): void;
    /**
     * Send event to a specific subscribed view
     */
    notifyView(viewId: number, eventName: string, payload: any): boolean;
    /**
     * Remove all subscriptions for a view
     */
    removeViewSubscriptions(viewId: number): void;
    /**
     * Remove all subscriptions for a backend
     */
    removeBackendSubscriptions(appId: string): void;
}
//# sourceMappingURL=EventSubscriberManager.d.ts.map