/** * This script is injected into a plugins custom settings ui by the Homebridge UI * You should not include it in your own code, however you can use it for type information if desired. * It provides the interface to interact with the Homebridge UI service. */ declare let EventTargetConstructor: { new (): EventTarget; prototype: EventTarget; }; /** * Polyfill for older browsers that do not support EventTarget as a constructor. * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget */ declare function isEventTargetConstructible(): boolean; declare class HomebridgePluginUi extends EventTargetConstructor { private origin; private lastBodyHeight; private linkRequests; toast: HomebridgeUiToastHelper; plugin: any; serverEnv: any; constructor(); private _handleIncomingMessage; _postMessage(message: any): void; private _setBodyClass; private _setInlineStyle; private _setLinkElement; private _monitorFrameHeight; private _requestResponse; fixScrollHeight(): void; closeSettings(): void; showSpinner(): void; hideSpinner(): void; disableSaveButton(): void; enableSaveButton(): void; showSchemaForm(): void; hideSchemaForm(): void; createForm(schema: any, data: any, submitButton?: string, cancelButton?: string): HomebridgeUiFormHelper; endForm(): void; getPluginConfig(): Promise; updatePluginConfig(pluginConfig: any): Promise; savePluginConfig(): Promise; getPluginConfigSchema(): Promise; getCachedAccessories(): Promise[]>; getCachedMatterAccessories(): Promise[]>; request(path: string, body?: any): Promise; userCurrentLightingMode(): Promise<'dark' | 'light'>; i18nCurrentLang(): Promise; i18nGetTranslation(): Promise>; } declare class HomebridgeUiToastHelper { private parent; constructor(parent: HomebridgePluginUi); private _postMessage; success(message: string, title?: string): void; error(message: string, title?: string): void; warning(message: string, title?: string): void; info(message: string, title?: string): void; } declare class HomebridgeUiFormHelper { private parent; private formId; private _changeHandle?; private _submitHandle?; private _cancelHandle?; end: () => void; constructor(parent: HomebridgePluginUi, schema: Record, data: Record, submitButton?: string, cancelButton?: string); private _eventHandle; onChange(fn: any): void; onSubmit(fn: any): void; onCancel(fn: any): void; } //# sourceMappingURL=ui.d.ts.map