import * as i0 from '@angular/core'; import { ElementRef, StaticProvider, Injector, EnvironmentInjector, Binding, TemplateRef } from '@angular/core'; import { Subject, ReplaySubject } from 'rxjs'; /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ /** * Reference to a modal dialog * @typeParam T - the type of the content * @typeParam CT - the close type */ declare class ModalRef { /** Emits the close value when the modal is hidden. */ hidden: Subject; /** Allows messaging state to consumer w/o closing the dialog. */ message: Subject; /** Emits the modal element reference when it is shown. */ shown: ReplaySubject>; /** * The modal options passed during creation. * * @defaultValue `{}` * @see {@link SiModalService} */ data: ModalOptions; /** @defaultValue true */ ignoreBackdropClick: boolean; /** * Custom class for modal-dialog * * @defaultValue '' */ dialogClass: string; /** * The layer of the modal. The modal with the highest layer will be shown on top. * * @defaultValue 0 */ layer: number; /** The default close value of the modal. */ closeValue?: CT; get content(): T; /** Set the input of a component shown in the modal. */ setInput(input: string, value: unknown): void; /** * @defaultValue `() => false` */ isCurrent: () => boolean; /** * @defaultValue `() => {}` */ detach: () => void; /** * Close the modal with a custom close value. * * @defaultValue `() => {}` */ hide: (reason?: CT) => void; /** * When `data.disableAutoHide` is set, messages the `reason`, otherwise calls {@link hide}. */ messageOrHide(reason?: CT): void; } interface ModalDependencyInjectionOptions { /** Additional providers for the modal. */ providers?: StaticProvider[]; /** Optional element Injector. */ injector?: Injector; /** Optional environment Injector. */ environmentInjector?: EnvironmentInjector; } interface ModalOptions> extends ModalDependencyInjectionOptions { /** * Angular bindings for component content, created with `inputBinding`, `outputBinding`, or * `twoWayBinding`. Ignored for template content. */ bindings?: Binding[]; /** * Use this to assign values to either `@Input()` or `input()` fields of the provided component. * If a template is used, the values are available in the template context. */ inputValues?: Record; /** When set to true, clicking the backdrop has no effect. */ ignoreBackdropClick?: boolean; /** When set to true, backdrop click or Esc don't close the modal. Instead a message will be sent. */ messageInsteadOfAutoHide?: boolean; /** Handle Esc to close/message. */ keyboard?: boolean; /** Whether to enable animation. */ animated?: boolean; /** Additional CSS class. */ class?: string; /** aria-labelled-by value. */ ariaLabelledBy?: string; } declare class SiModalService { private modalsCount; private readonly overlay; private injector; /** * Shows a modal with the given content and configuration. * @param content - Content to be displayed in the modal can be a template reference or a component. * @param config - Configuration for the modal. * @param closeValue - Default closing value which can be overridden by calling `modalRef.hide(value)`. * @returns A reference to the modal. */ show(content: TemplateRef | (new (...args: any[]) => T), config: ModalOptions, closeValue?: CT): ModalRef; private attachComponent; protected detach(modalRef: ModalRef): void; protected buildInjector(): Injector; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Copyright (c) Siemens 2016 - 2026 * SPDX-License-Identifier: MIT */ declare const createModalConfig: (inputs?: { [key: string]: any; }) => ModalOptions; export { ModalRef, SiModalService, createModalConfig }; export type { ModalDependencyInjectionOptions, ModalOptions };