import { type MentionProvider, type MentionContextIdentifier, ErrorCallback, InfoCallback, ResultCallback } from './MentionResource'; import { type MentionDescription, type MentionDisabledState, type MentionDisabledStateInput, type InviteFromMentionProvider, type XProductInviteMentionProvider, type AnalyticsCallback } from '../types'; export type { MentionDescription }; export type MentionProviderFunctions = Omit<{ [Key in keyof MentionProvider]: MentionProvider[Key] extends Function ? MentionProvider[Key] : never; }, keyof InviteFromMentionProvider | keyof XProductInviteMentionProvider>; /** * This component is stateful and should be instantianted per contextIdentifiers. */ export default class ContextMentionResource implements MentionProvider { private mentionProvider; private contextIdentifier; constructor(mentionProvider: MentionProvider, contextIdentifier: MentionContextIdentifier); getContextIdentifier(): MentionContextIdentifier | undefined; callWithContextIds: (f: K, declaredArgs: number) => MentionProvider[K]; callDefault: (f: K) => MentionProvider[K]; subscribe: (key: string, callback?: ResultCallback | undefined, errCallback?: ErrorCallback, infoCallback?: InfoCallback, allResultsCallback?: ResultCallback | undefined, analyticsCallback?: AnalyticsCallback) => void; unsubscribe: (key: string) => void; filter: (query?: string, contextIdentifier?: MentionContextIdentifier) => void; recordMentionSelection: (mention: MentionDescription, contextIdentifier?: MentionContextIdentifier) => void; shouldHighlightMention: (mention: MentionDescription) => boolean; getMentionDisabledState: (mention: MentionDisabledStateInput) => MentionDisabledState | undefined; subscribeToDisabledStateChanges: (listener: () => void) => (() => void); notifyMentionDestroyed: (mention: { id: string; }) => void; isFiltering: (query: string) => boolean; }