import * as _angular_core from '@angular/core'; import { Type, InjectionToken, OnDestroy, Injector } from '@angular/core'; import { DynamicDialogRef } from 'primeng/dynamicdialog'; interface DynamicDrawerConfigInterface { header?: string; position?: string; data?: any; fullScreen?: boolean; modal?: boolean; closable?: boolean; closeOnEscape?: boolean; dismissible?: boolean; appendTo?: any; transitionOptions?: string; styleClass?: string; inputValues?: any; showMaximizeToggle?: boolean; maximizeTooltip?: string; restoreTooltip?: string; } declare class DrawerService { private readonly appRef; private readonly env; private readonly rootInjector; private readonly destroyRef; private readonly doc; private readonly activeHosts; private readonly animationCleanupBufferMs; private readonly drawerLeaveAnimationMs; defauiltConfig: DynamicDrawerConfigInterface; constructor(); open(component: Type, config?: DynamicDrawerConfigInterface): DynamicDialogRef; private closeHost; private cleanupHost; private readTransitionDurationMs; private preloadDrawerHost; private resolveAppendTarget; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare const DynamicDrawerConfig: InjectionToken; /** * Controller to dynamically update drawer properties from inside the child component. * Inject this in your drawer content component to modify drawer behavior. */ declare class DrawerController { private _styleClass; private _header; private _fullScreen; private _maximized; /** Get the current additional styleClass */ get styleClass(): _angular_core.WritableSignal; /** Get the current header */ get header(): _angular_core.WritableSignal; /** Get the current fullScreen state */ get fullScreen(): _angular_core.WritableSignal; /** Get the current maximized (full-width) state */ get maximized(): _angular_core.WritableSignal; /** Add or replace the dynamic styleClass */ setStyleClass(styleClass: string): void; /** Append a class to the existing styleClass */ addClass(className: string): void; /** Remove a class from the styleClass */ removeClass(className: string): void; /** Toggle a class on/off */ toggleClass(className: string): void; /** Update the drawer header */ setHeader(header: string): void; /** Toggle fullScreen mode */ setFullScreen(fullScreen: boolean): void; /** Set maximized (full-width) state */ setMaximized(maximized: boolean): void; /** Toggle maximized (full-width) state */ toggleMaximized(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class DynamicDrawerHost implements OnDestroy { visible: _angular_core.ModelSignal; private readonly pDrawer; private primeDrawer; cmp: _angular_core.WritableSignal; cfg: _angular_core.WritableSignal; cmpInputs: _angular_core.WritableSignal>; childInjector: Injector; private ref?; private refCloseSubscription?; private readonly fixedPosition; private closed; private drawerController; private readonly host; private readonly renderer; private readonly transloco; private resizeAnimTimer; private readonly RESIZE_ANIM_CLASS; private readonly RESIZE_ANIM_DURATION_MS; constructor(); /** Computed styleClass combining config + dynamic controller class */ computedStyleClass: _angular_core.Signal; /** Whether the maximize toggle button is visible in the header */ canShowMaximizeToggle: _angular_core.Signal; /** Tooltip for maximize/restore button (state-aware) */ maximizeButtonTooltip: _angular_core.Signal; /** * Accessible name for the icon-only close button. A method, not a * `computed`: with no signal to track, a `computed` would keep the raw key * if it first ran before the translations loaded. */ closeButtonLabel(): string; /** Icon for maximize/restore button (state-aware) */ maximizeButtonIcon: _angular_core.Signal<"layout.minimize-01" | "layout.maximize-01">; /** Toggle the drawer's full-width state */ toggleMaximized(): void; computedDrawerStyle: _angular_core.Signal | null>; /** Computed header - controller overrides config if set */ computedHeader: _angular_core.Signal; /** Computed fullScreen - controller overrides config if set */ computedFullScreen: _angular_core.Signal; connect(opts: { component: any; config?: any; parent: Injector; ref: DynamicDialogRef; fixedPosition?: boolean; }): void; show(): void; hide(): void; handleHide(data?: null): void; /** Close the drawer ref at most once, regardless of the close path. */ private closeOnce; onDrawerShow(): void; onDrawerHide(): void; /** * PrimeNG appends the drawer's modal mask to `` — not to `appendTo` — * and only removes it from its own dismiss paths (mask click / Escape -> * close() -> disableModality() -> animationend -> destroyModal()). Every * programmatic close (the header X, `ref.close()` from the content * component, DrawerService.closeHost) skips those paths, and p-drawer's own * ngOnDestroy is guarded by `if (this.visible && this.modal)` — `visible` is * already false by then, so it cleans up nothing. * * The leftover `.p-overlay-mask` is `position: fixed` and covers the whole * viewport, so the app silently stops responding to clicks until a reload. * Drive PrimeNG's teardown explicitly instead: fade the mask out when the * drawer starts closing, and hard-remove it when the host is destroyed. */ private beginMaskTeardown; /** * Only consults the cached instance — this also runs from ngOnDestroy, where * reading a view query is not safe. A drawer that never opened never created * a mask, so there is nothing to miss. */ private forceMaskTeardown; private resolvePrimeDrawer; private getDrawerElement; private applyMaximizedInlineStyles; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { DrawerController, DrawerService, DynamicDrawerConfig, DynamicDrawerHost }; export type { DynamicDrawerConfigInterface };