import * as React from 'react';
import { type DaraEvent, type DaraEventMap, type EventMap, type IEventBus, type UnionFromMap } from '../../types/core';
/**
 * Global event bus that allows to publish and subscribe to events.
 */
export declare class EventBus<MapT extends EventMap> implements IEventBus<MapT> {
    #private;
    constructor(parentBus?: EventBus<MapT>);
    publish<T extends keyof MapT>(type: T, data: MapT[T]): void;
    subscribe(callback: (event: UnionFromMap<MapT>) => void): () => void;
}
/** Default top-level event bus */
export declare const DEFAULT_BUS: EventBus<DaraEventMap>;
/** Hook to get the event bus instance */
export declare function useEventBus(): EventBus<DaraEventMap>;
interface EventCapturerProps {
    children: React.ReactNode;
    /** callback to call when the event is captured */
    onEvent: (event: DaraEvent) => void;
}
/**
 * Component that captures events of a given type fired in its children
 * and calls the provided callback with the event data.
 */
export declare function EventCapturer({ children, onEvent }: EventCapturerProps): React.ReactNode;
export {};
//# sourceMappingURL=event-bus.d.ts.map