import { SymbolRegistry } from '@agorapulse/ui-symbol';
import { ComponentType } from '@angular/cdk/portal';
import * as i0 from '@angular/core';
import { TemplateRef } from '@angular/core';
import { MatDialogRef, MatDialog, MatDialogConfig } from '@angular/material/dialog';

interface ModalConfig<T = unknown> extends ModalConfigBase<T> {
    closable?: boolean;
    headerBottomBorderEnabled?: boolean;
}
interface ModalConfigBase<T> {
    backdropCloseEnable?: boolean;
    matDialogConfig?: MatDialogConfig<T>;
}
interface HasDialogRef<T, R> {
    dialogRef: MatDialogRef<T, R>;
}
type HasModalData<D> = {
    [x in 'modalData' | 'dialogData' | 'data']: D;
};
type ExtractDialogRef<C> = C extends HasDialogRef<infer T, infer R> ? MatDialogRef<T, R> : MatDialogRef<C>;
type ExtractModalData<C> = C extends HasModalData<infer D> ? D : unknown;
declare class ModalComponent {
    dialogRef: MatDialogRef<ModalComponent, void>;
    symbolRegistry: SymbolRegistry;
    static readonly PANEL_CLASS = "modal-container";
    constructor(dialogRef: MatDialogRef<ModalComponent, void>, symbolRegistry: SymbolRegistry);
    closable: boolean;
    headerBottomBorderEnabled: boolean;
    footerTemplate: TemplateRef<any> | undefined;
    footerVisible: boolean;
    headerTemplate: TemplateRef<any> | undefined;
    headerVisible: boolean;
    mainTemplate: TemplateRef<any>;
    sidePaneTemplate: TemplateRef<any> | undefined;
    sidePaneStyle: {
        [arg: string]: string;
    } | undefined;
    containerStyle: {
        [arg: string]: string;
    } | undefined;
    headerStyle: {
        [arg: string]: string;
    } | undefined;
    contentStyle: {
        [arg: string]: string;
    } | undefined;
    footerStyle: {
        [arg: string]: string;
    } | undefined;
    defaultLayout: boolean;
    /**
     * Use it to open a modal containing the {@link componentType} component, with the right configuration.
     */
    static openDialog<C>(matDialog: MatDialog, config: ModalConfigBase<ExtractModalData<C>> | undefined, componentType: ComponentType<C>): ExtractDialogRef<C>;
    /**
     * Use it to open a modal containing the {@link componentType} component, with the right configuration, and wait for it to be closed.
     */
    static openDialogAndWait<C>(matDialog: MatDialog, config: ModalConfigBase<ExtractModalData<C>> | undefined, componentType: ComponentType<C>): Promise<C extends HasDialogRef<unknown, infer R> ? R : unknown>;
    /**
     * Use it to open a modal containing the {@link componentType} component, with the right configuration.
     * @deprecated use {@link openDialog} instead for better type inference
     */
    static openWithComponent<T, Y>(matDialog: MatDialog, config: ModalConfigBase<Y> | undefined, componentType: ComponentType<T>): MatDialogRef<T>;
    /**
     * Use it to open a modal containing the provided templates, with the right configuration.
     */
    static openWithTemplates<T>(matDialog: MatDialog, headerTemplate: TemplateRef<any> | undefined, mainTemplate: TemplateRef<any>, footerTemplate?: TemplateRef<any> | undefined, config?: ModalConfig<T>, sidePaneTemplate?: TemplateRef<any> | undefined): MatDialogRef<ModalComponent>;
    close(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "ap-modal", never, { "closable": { "alias": "closable"; "required": false; }; "headerBottomBorderEnabled": { "alias": "headerBottomBorderEnabled"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "footerVisible": { "alias": "footerVisible"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "headerVisible": { "alias": "headerVisible"; "required": false; }; "mainTemplate": { "alias": "mainTemplate"; "required": true; }; "sidePaneTemplate": { "alias": "sidePaneTemplate"; "required": false; }; "sidePaneStyle": { "alias": "sidePaneStyle"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "headerStyle": { "alias": "headerStyle"; "required": false; }; "contentStyle": { "alias": "contentStyle"; "required": false; }; "footerStyle": { "alias": "footerStyle"; "required": false; }; "defaultLayout": { "alias": "defaultLayout"; "required": false; }; }, {}, never, never, true, never>;
}

export { ModalComponent };
export type { ModalConfig, ModalConfigBase };
