import * as rxjs from 'rxjs'; import { Observable } from 'rxjs'; import * as i0 from '@angular/core'; import { Type, AfterContentInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef } from '@angular/core'; import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y'; import * as i2 from '@angular/cdk/portal'; import { ComponentPortal } from '@angular/cdk/portal'; import * as i1 from '@daffodil/design'; import { DaffOpenable, DaffOpenableDirective, DaffFocusStackService } from '@daffodil/design'; import * as i3 from '@angular/cdk/overlay'; import { Overlay } from '@angular/cdk/overlay'; import * as i1$1 from '@angular/common'; import * as i4 from '@daffodil/design/button'; import * as i5 from '@fortawesome/angular-fontawesome'; import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types'; /** * Reference to modal instance. */ interface DaffModalRef { /** * The component instance inside the modal. */ instance: T; /** * Closes the modal. */ close(): void; /** * Emits when the modal close animation completes. */ afterClosed: Observable; } type DaffModalVerticalPosition = 'top' | 'center'; interface DaffModalPosition { /** * The vertical position of the modal. Can be 'top' or 'center'. */ vertical?: DaffModalVerticalPosition; /** * Optional offset from the top edge. Defaults to `10rem`. */ offsetTop?: string; } interface DaffModalConfiguration { /** * A hook for what to do when the backdrop behind a * DaffModalComponent is interacted with. */ onBackdropClicked?: () => void; /** Sets the `aria-labelledby` property on the modal. */ ariaLabelledBy?: string; /** * The position of the modal. If not provided, defaults to centered horizontally and vertically. * Horizontal position is always center. * * @example * ```ts * // Center (default) * { vertical: 'center' } * * // Top with offset * { vertical: 'top', offsetTop: '2rem' } * ``` */ position?: DaffModalPosition; } declare class DaffModalService { private overlay; private _modals; constructor(overlay: Overlay); private defaultConfiguration; private _attachModal; private _attachModalContent; private _createPositionStrategy; private _createOverlayRef; private _removeModal; private _closeAllModals; open(component: Type, configuration?: Partial): DaffModalRef; close(component: DaffModalComponent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class DaffModalComponent implements AfterContentInit, AfterViewInit, OnDestroy, DaffOpenable { private modalService; private _focusTrapFactory; private elementRef; private openDirective; private _focusStack; private changeDetector; /** * @docs-private */ readonly closing: i0.WritableSignal; private _ariaLabelledBy; /** * @docs-private * * By default, the `aria-labelledby` of the modal is set to the `id` of the modal title. */ get ariaLabelledBy(): string; set ariaLabelledBy(value: string); /** * @docs-private * * The CDK Portal outlet used to portal content into the modal. */ private _portalOutlet; /** * Private subject for closed animation completion events. */ private _closedAnimationCompleted; /** * Observable that emits when the close animation is completed. */ readonly closedAnimationCompleted$: rxjs.Observable; /** * @docs-private */ onEscape(): void; private _focusTrap; constructor(modalService: DaffModalService, _focusTrapFactory: ConfigurableFocusTrapFactory, elementRef: ElementRef, openDirective: DaffOpenableDirective, _focusStack: DaffFocusStackService, changeDetector: ChangeDetectorRef); /** * @docs-private */ ngAfterContentInit(): void; /** * @docs-private */ ngAfterViewInit(): void; /** * @docs-private * * Helper method to attach portable content to modal. */ attachContent(portal: ComponentPortal): any; /** * Tracks the open state of the modal. */ get open(): i0.ModelSignal; /** * @docs-private * * Reveals the modal. */ reveal(): void; /** * @docs-private * * Hides the modal. */ hide(): void; /** * @docs-private * * Toggles the visibility of the modal. */ toggle(): void; /** * @docs-private */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DaffModalHeaderComponent { faXmark: _fortawesome_fontawesome_common_types.IconDefinition; /** * Whether or not a modal is dismissible. */ dismissible: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Title of a modal. */ declare class DaffModalTitleDirective { private modal; /** * @docs-private */ _id: string; constructor(modal: DaffModalComponent); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class DaffModalContentComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DaffModalActionsComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * The DaffModalCloseDirective is a helper directive that passes a click * event to the button it's used with to close a modal. It needs to be * implemented with the `