/** * Service for creating and displaying dialogs containing a web component * * @emits dialog.destroyed - When the dialog is beeing externally destroyed, * e.g. by closing a popup window (depending on platform), a * {@link DialogDestroyedEvent} will be emitted using * {@link EventDispatcher} */ export interface DialogRenderer { /** * Create a new dialog and render its contents. Depending on what kind of * platform the service is used on, the dialog might be rendered in the * current {@link Document} or opened in a new popup window. * * @param name the name of the web component representing the dialog * @param properties any properties to send to the dialog * @param listeners any event listeners to register on the dialog * @returns id representing the dialog */ create(name: string, properties?: DialogProperties, listeners?: DialogListeners): number; /** * Update an existing dialog with new properties * * @param id the dialog identifier * @param properties any properties to send to the dialog */ update?(id: number, properties?: DialogProperties): void; /** * Destroy a dialog * * @param id id representing the dialog */ destroy(id: number): void; } export declare type DialogProperties = Record; export declare type DialogListeners = Record) => void>; /** * @event dialog.destroyed - Emitted when a dialog is externally destroyed, e.g. * by closing a popup window */ export declare type DialogDestroyedEvent = CustomEvent;