import { ISettings, IDebug, Config } from './types'; import { StateSetter, StoreState } from './services/store'; import { WidgetEvents } from './services/events'; declare class AdalongWidget extends WidgetEvents { /** * Layout of the widget: mosaic, carousel or wall * This information is known once the widget has been correctly loaded */ layout?: ISettings['type']; loaded: boolean; storeState: { getState: () => StoreState; stateSetter: StateSetter; }; private _id; private token?; private startDate; private config; private postViewerPortalId?; private portalDiv?; /** * @param token Widget token */ constructor(token?: string, config?: Config); /** * Get the readonly widget identifier */ get id(): string; getSlideState(): { canSlideLeft: boolean; canSlideRight: boolean; }; changePost(dir: 'left' | 'right'): void; setSlider(dir: 'left' | 'right'): void; /** * Creates a div in the dom for the widget modal (react portals) */ private createPostViewerPortal; load(element: string | HTMLElement, settings?: Partial): Promise; setDebug(debug: IDebug): void; /** * Clean widget after removal */ protected destroy(): void; private observeWidgetRemoval; private loadWidgetContent; private getRootElement; private addFonts; /** * Return sources set as attributes in the given dom element */ private getSources; /** * Emit a custom event 'adalongWidgetCreated' when a widget has been created */ private emitWidgetCreated; /** * Create the api to manipulate the widget(s) */ private createAdalongAPI; } export = AdalongWidget;