import * as i0 from '@angular/core'; import { ChangeDetectionStrategy, OnDestroy, DoCheck, ViewContainerRef, ElementRef, Renderer2, Type, Injector, ApplicationRef, ComponentRef, Provider, InjectionToken } from '@angular/core'; import { ILuPopupConfig, ALuPopupRef, ILuPopupRef, ILuPopupRefFactory } from '@lucca-front/ng/popup'; import * as _lucca_front_ng_modal from '@lucca-front/ng/modal'; import { Observable, ReplaySubject, Subject } from 'rxjs'; import { ComponentType } from '@angular/cdk/portal'; import { LuDialogSize, LuDialogService } from '@lucca-front/ng/dialog'; import * as i1 from '@angular/cdk/overlay'; import { Overlay, ComponentType as ComponentType$1 } from '@angular/cdk/overlay'; import * as i2 from '@angular/cdk/dialog'; import { LuTranslation } from '@lucca-front/ng/core'; type LuModalMode = 'modal' | 'sidepanel'; interface LuModalClasses { panel: string; panelContainer: string; panelInner: string; overlayPane?: string; } declare const luModalClasses: Record; type LuModalModeWithPosition = { mode?: 'modal'; position: undefined | 'center'; } | { mode: 'sidepanel'; position: 'left' | 'right'; }; type LuModalConfig = ILuPopupConfig & LuModalModeWithPosition & { changeDetection: ChangeDetectionStrategy; }; declare const luDefaultModalConfig: LuModalConfig; declare const luDefaultSidepanelConfig: LuModalConfig; interface ILuModalContent { title: string | Observable; submitAction?: () => T | Observable; submitLabel?: string | Observable; submitPalette?: string; submitDisabled?: boolean | Observable; submitCounter?: number | Observable; cancelLabel?: string | Observable; } type LuModalContentResult = T extends ILuModalContent & { submitAction: unknown; } ? R : never; interface ILuModalRef extends ILuPopupRef { mode: LuModalMode; modalClasses: LuModalClasses; resize(size: LuDialogSize): void; } interface IModalRefFactory { forge(component: ComponentType, config: C): ILuModalRef>; } declare abstract class ALuModalRef extends ALuPopupRef implements ILuModalRef { get mode(): LuModalMode; get modalClasses(): LuModalClasses; resize(size: LuDialogSize): void; } declare abstract class ALuModalPanelComponent implements OnDestroy, DoCheck { protected _ref: ALuModalRef; protected _containerRef: ViewContainerRef; protected _componentInstance: ILuModalContent; protected doCheck$: ReplaySubject; intl: _lucca_front_ng_modal.ILuModalLabel; protected title$: Observable; protected submitLabel$: Observable; protected cancelLabel$: Observable; protected submitCounter$: Observable; protected submitDisabled$: Observable; protected hasSubmitCounter$: Observable; protected closeLabel: string; get isSubmitHidden(): boolean; get submitPalette(): string; submitClass$: Subject; error$: Subject; readonly modalId: number; private _subs; modalClasses: LuModalClasses; constructor(_ref: ALuModalRef, _elementRef: ElementRef, _renderer: Renderer2); ngDoCheck(): void; attachInnerComponent(componentType: Type, injector: Injector): i0.ComponentRef; ngOnDestroy(): void; dismiss(): void; submit(): void; private listenComponentValue; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never, never, true, never>; } declare class LuModalPanelComponent extends ALuModalPanelComponent { constructor(_ref: ALuModalRef, _elementRef: ElementRef, _renderer: Renderer2); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-modal-panel", never, {}, {}, never, never, true, never>; } declare class LuModalPanelComponentDefaultCD extends ALuModalPanelComponent { constructor(_ref: ALuModalRef, _elementRef: ElementRef, _renderer: Renderer2); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "lu-modal-panel-default", never, {}, {}, never, never, true, never>; } declare class LuModalRef extends ALuModalRef implements ILuModalRef { protected _overlay: Overlay; protected _injector: Injector; protected _component: ComponentType$1; protected _config: C; protected _applicationRef: ApplicationRef; protected _containerRef: ComponentRef>; constructor(_overlay: Overlay, _injector: Injector, _component: ComponentType$1, _config: C, _applicationRef: ApplicationRef); protected _openPopup(data?: D): void; protected _closePopup(): void; protected _getOverlayPanelClasses(): string[]; } declare class LuModalRefFactory implements ILuPopupRefFactory { protected _overlay: Overlay; protected _injector: Injector; protected _applicationRef: ApplicationRef; constructor(_overlay: Overlay, _injector: Injector); forge(component: ComponentType$1, config: C): LuModalRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Provide LuModal. * Note that OverlayModule should be imported in one of the EnvironmentInjectors (AppModule, lazy-loaded route) using `providers: [importProvidersFrom(OverlayModule)]`. */ declare function provideLuModal(): Provider[]; /** * @deprecated use `OverlayModule, DialogModule` imports && provide `provideLuModal(), LuDialogService` instead */ declare class LuModalModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class LuModal { protected _factory: _lucca_front_ng_modal.IModalRefFactory; protected _config: LuModalConfig; protected luDialogService: LuDialogService; open(component: ComponentType, data?: D, config?: Partial): ILuModalRef>; legacyOpen(component: ComponentType, data?: D, config?: Partial): ILuModalRef>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** Injection token that can be used to access the data that was passed in to a dialog. */ declare const LU_MODAL_DATA: InjectionToken; declare const LU_MODAL_CONFIG: InjectionToken; declare const LU_MODAL_REF_FACTORY: InjectionToken; declare const LU_MODAL_TRANSLATIONS: InjectionToken>; interface ILuModalLabel { submit: string; cancel: string; close: string; } declare const luModalTranslations: LuTranslation; declare function setAriaHiddenOnApplicationRoot(applicationRef: ApplicationRef, hidden: boolean): void; export { ALuModalPanelComponent, ALuModalRef, LU_MODAL_CONFIG, LU_MODAL_DATA, LU_MODAL_REF_FACTORY, LU_MODAL_TRANSLATIONS, LuModal, LuModalModule, LuModalPanelComponent, LuModalPanelComponentDefaultCD, LuModalRefFactory, luDefaultModalConfig, luDefaultSidepanelConfig, luModalClasses, luModalTranslations, provideLuModal, setAriaHiddenOnApplicationRoot }; export type { ILuModalContent, ILuModalLabel, ILuModalRef, IModalRefFactory, LuModalClasses, LuModalConfig, LuModalContentResult, LuModalMode };