import type { XEvent, XEventPayload, XEventsTypes } from '../wiring/events.types'; import type { WireMetadata } from '../wiring/wiring.types'; import type { EventPayload, SubjectPayload } from '../x-bus'; /** * Composable which injects the current location, returns the `on` and `emit` functions * using the bus and applying component metadata. Also unsubscribe from events when components is * unmounted. * * @remarks This composable tries to use the `XPlugin` bus and catches the exception thrown * by the `XPlugin` if it was not instantiated and uses the default `xBus` as fallback. * * @returns An object with the `on` and `emit` functions. * @public */ export declare function useXBus(): { on: (event: Event, withMetadata: Metadata) => { subscribe: (callback: (payload: Metadata extends true ? SubjectPayload, WireMetadata> : EventPayload) => void) => void; }; emit: (event: Event, payload?: XEventPayload, metadata?: Omit) => Promise>; }; //# sourceMappingURL=use-x-bus.d.ts.map