import { FastCommentsCommentCountConfig, FastCommentsCommentWidgetConfig, FastCommentsSSOUserData, FastCommentsCollabChatWidgetConfig, FastCommentsImageChatWidgetConfig, FastCommentsLiveChatWidgetConfig } from 'fastcomments-typescript'; export * from 'fastcomments-typescript'; import * as React from 'react'; import { MutableRefObject } from 'react'; type PromiseResolver = (value: void | PromiseLike) => void; type PromiseRejection = (value: void | PromiseLike) => void; type PromiseHandler = [PromiseResolver, PromiseRejection]; /** * Load a script and only add it to the DOM once. */ declare class ScriptLoader { scriptLoadingStarted: boolean; scriptLoadPromiseHandlers: PromiseHandler[]; insertScript(src: string, id: string, parentElement: Element): Promise; } declare enum LoadStatus$9 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$9 { status: LoadStatus$9; widgetId: string | null; } interface WidgetInstance$6 { destroy: Function; update: Function; } declare class FastCommentsCommentCountWidget extends React.Component { lastWidgetInstance: WidgetInstance$6 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsCommentCountConfig); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsCommentCountConfig): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$8 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$8 { status: LoadStatus$8; widgetId: string | null; } interface OpenProfileOptions { userId: string; } interface WidgetInstance$5 { destroy: Function; update: Function; updateUser: (user: FastCommentsSSOUserData) => void; openProfile: (options: OpenProfileOptions) => void; } declare class FastCommentsCommentWidget extends React.Component { lastWidgetInstance: WidgetInstance$5 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsCommentWidgetConfig); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsCommentWidgetConfig): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$7 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$7 { status: LoadStatus$7; widgetId: string | null; } interface WidgetInstance$4 { destroy: Function; update: Function; } interface FastCommentsCollabChatWidgetConfigReact extends FastCommentsCollabChatWidgetConfig { targetRef: MutableRefObject; } declare class FastCommentsCollabChatWidget extends React.Component { lastWidgetInstance: WidgetInstance$4 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsCollabChatWidgetConfigReact); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsCollabChatWidgetConfigReact): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$6 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$6 { status: LoadStatus$6; widgetId: string | null; } interface WidgetInstance$3 { destroy: Function; update: Function; } interface FastCommentsImageChatWidgetConfigReact extends FastCommentsImageChatWidgetConfig { targetRef: MutableRefObject; } declare class FastCommentsImageChatWidget extends React.Component { lastWidgetInstance: WidgetInstance$3 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsImageChatWidgetConfigReact); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsImageChatWidgetConfigReact): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$5 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$5 { status: LoadStatus$5; widgetId: string | null; } interface WidgetInstance$2 { destroy: Function; update: Function; } declare class FastCommentsLiveChatWidget extends React.Component { lastWidgetInstance: WidgetInstance$2 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsLiveChatWidgetConfig); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsLiveChatWidgetConfig): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$4 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$4 { status: LoadStatus$4; widgetId: string | null; } interface FastCommentsRecentCommentsWidgetProps { tenantId: string; urlId?: string; count?: number; hasDarkBackground?: boolean; translations?: Record; region?: 'eu' | string; apiHost?: string; } declare class FastCommentsRecentCommentsWidget extends React.Component { static widgetLoader: ScriptLoader; constructor(props: FastCommentsRecentCommentsWidgetProps); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsRecentCommentsWidgetProps): boolean; componentDidUpdate(): Promise | undefined; loadInstance(): Promise; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$3 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$3 { status: LoadStatus$3; widgetId: string | null; } interface FastCommentsRecentDiscussionsWidgetProps { tenantId: string; count?: number; hasDarkBackground?: boolean; translations?: Record; region?: 'eu' | string; apiHost?: string; } declare class FastCommentsRecentDiscussionsWidget extends React.Component { static widgetLoader: ScriptLoader; constructor(props: FastCommentsRecentDiscussionsWidgetProps); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsRecentDiscussionsWidgetProps): boolean; componentDidUpdate(): Promise | undefined; loadInstance(): Promise; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$2 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$2 { status: LoadStatus$2; widgetId: string | null; } interface WidgetInstance$1 { destroy: Function; update: Function; } interface FastCommentsReviewsSummaryWidgetProps { /** Id that represents you as a customer. */ tenantId: string; /** Id that represents the page, if you don't want to tie comments to the page url. Could be a URL or an ID (like an article id). */ urlId?: string; /** The region your account is in. If your account was created via fastcomments.com, you can leave this undefined. EU customers will want to set it to 'eu'. Does not apply to VanillaJS widget. */ region?: 'eu'; } declare class FastCommentsReviewsSummaryWidget extends React.Component { lastWidgetInstance: WidgetInstance$1 | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsReviewsSummaryWidgetProps); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsReviewsSummaryWidgetProps): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus$1 { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState$1 { status: LoadStatus$1; widgetId: string | null; } interface FastCommentsTopPagesWidgetProps { tenantId: string; hasDarkBackground?: boolean; region?: 'eu' | string; apiHost?: string; } declare class FastCommentsTopPagesWidget extends React.Component { static widgetLoader: ScriptLoader; constructor(props: FastCommentsTopPagesWidgetProps); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsTopPagesWidgetProps): boolean; componentDidUpdate(): Promise | undefined; loadInstance(): Promise; instantiateWidget(): void; render(): React.JSX.Element; } declare enum LoadStatus { Started = 0, ScriptLoaded = 1, Done = 2, Error = 3 } interface FastCommentsState { status: LoadStatus; widgetId: string | null; } interface WidgetInstance { destroy: Function; update: Function; } interface FastCommentsUserActivityFeedWidgetProps extends FastCommentsCommentWidgetConfig { /** With SSO, this will be tenantId + ':' + userId. With Simple SSO this will be tenantId + ':' + userEmail. **/ userId: string; } declare class FastCommentsUserActivityFeedWidget extends React.Component { lastWidgetInstance: WidgetInstance | null; static widgetLoader: ScriptLoader; constructor(props: FastCommentsUserActivityFeedWidgetProps); componentDidMount(): Promise; shouldComponentUpdate(nextProps: FastCommentsCommentWidgetConfig): boolean; componentDidUpdate(): void | Promise; loadInstance(): Promise; reset(): void; instantiateWidget(): void; render(): React.JSX.Element; } export { FastCommentsCollabChatWidget, type FastCommentsCollabChatWidgetConfigReact, FastCommentsCommentCountWidget, FastCommentsCommentWidget, FastCommentsImageChatWidget, type FastCommentsImageChatWidgetConfigReact, FastCommentsLiveChatWidget, FastCommentsRecentCommentsWidget, type FastCommentsRecentCommentsWidgetProps, FastCommentsRecentDiscussionsWidget, type FastCommentsRecentDiscussionsWidgetProps, FastCommentsReviewsSummaryWidget, type FastCommentsReviewsSummaryWidgetProps, FastCommentsTopPagesWidget, type FastCommentsTopPagesWidgetProps, FastCommentsUserActivityFeedWidget, type FastCommentsUserActivityFeedWidgetProps };