import { BuddyRenderOptions, ExportData, ValidationResult, WidgetContext } from './types'; export default abstract class BaseWidget { protected readonly context: WidgetContext; constructor(context: WidgetContext); abstract init(): Promise; abstract render(domElement: HTMLDivElement): void; /** Render function for the widget buddy component. * @param domElement The DOM element to render into. * @param options Slot information from the host (e.g. whether the slot has * room for richer rendering than the standard buddy button). The * argument is optional for backwards compatibility — older hosts may * call `renderBuddy` without it. * @returns Whether or not the buddy is using custom rendering. */ renderBuddy?(domElement: HTMLDivElement, options?: BuddyRenderOptions): boolean; verifyPersistedUserConfiguration?(config: string): Promise; renderUserConfigurationForm?(domElement: HTMLDivElement): void; validateUserConfigurationForm?(): ValidationResult; getSerializedUserConfiguration?(): string; verifyPersistedAdminConfiguration?(config: string): Promise; renderAdminConfigurationForm?(domElement: HTMLDivElement): void; validateAdminConfigurationForm?(): ValidationResult; getSerializedAdminConfiguration?(): string; importData?(exportData: ExportData): Promise; exportData?(): Promise; updateDataAccess?(from: string[], to: string[]): Promise; cleanupResources?(): void; }