import type { BrowserTypes, Channel, ContextHandler, Listener } from '@finos/fdc3'; import { FullyQualifiedAppIdentifier, IProxyMessagingProvider } from '../contracts.js'; import { MessagingBase } from '../messaging/index.js'; import { IChannelFactory } from './channel.contracts.js'; /** Listens to broadcast events. This can be for a specific channel or can be for a DesktopAgent where the channel can change */ export declare class ContextListener extends MessagingBase implements ContextListener { /** * channel details must be passed when this is being created for use in a channel * If this is being used to listen for agent context updates this should be omitted * listenOnCurrentChannel flag indicates whether contextListener should always listen to current user channel */ private channelDetails; private channelFactory; private listenOnCurrentChannel; constructor( /** * channel details must be passed when this is being created for use in a channel * If this is being used to listen for agent context updates this should be omitted * listenOnCurrentChannel flag indicates whether contextListener should always listen to current user channel */ channelDetails: BrowserTypes.Channel | undefined, appIdentifier: FullyQualifiedAppIdentifier, messagingProvider: IProxyMessagingProvider, channelFactory: IChannelFactory, listenOnCurrentChannel?: boolean); private _id; addContextListener(contextType: string | null | string | ContextHandler, handler: ContextHandler): Promise; addContextListener(handler: ContextHandler): Promise; getCurrentChannel(): Promise; getCurrentContext(contextType?: string | null): Promise; private getAddContextListenerResponse; private getAddEventListenerResponse; private addBroadcastEventListener; private addChannelChangedEventListener; }