import * as i0 from '@angular/core';
import { InjectionToken, Injector, TemplateRef, Type, AfterViewInit, DestroyRef, ElementRef, ChangeDetectorRef, OnInit, OnChanges, OnDestroy } from '@angular/core';
import { DialogConfigBase, DialogContentBase, DialogRefBase, DialogContainer, DialogFooterBase, DialogHeaderBase, DialogBase, DialogBaseService } from '@fundamental-ngx/core/dialog';
import { CdkPortalOutlet, CdkPortalOutletAttachedRef } from '@angular/cdk/portal';
import * as i1 from '@fundamental-ngx/cdk/utils';
import { DynamicComponentContainer, CssClassBuilder, RtlService } from '@fundamental-ngx/cdk/utils';
import { IconFont } from '@fundamental-ngx/core/icon';
import * as i2 from '@fundamental-ngx/core/title';
import { Overlay } from '@angular/cdk/overlay';

declare const MESSAGE_BOX_DEFAULT_CONFIG: InjectionToken<MessageBoxConfig<any>>;
type MessageBoxType = 'error' | 'success' | 'warning' | 'information' | 'confirmation';
/** @hidden */
declare abstract class MessageBoxHost {
    /** @hidden */
    _messageBoxConfig: MessageBoxConfig | undefined;
}
declare class MessageBoxConfig<T = any> extends DialogConfigBase<T> {
    /** Message box type */
    type?: MessageBoxType;
    /** Whether to show the semantic icon */
    showSemanticIcon?: boolean;
    /** Custom semantic icon name */
    customSemanticIcon?: string;
    /** Injector */
    injector?: Injector;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxConfig<any>, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MessageBoxConfig<any>>;
}

/**
 * Building block of the message box used to create message box body.
 *
 * ```html
 * <fd-message-box-body></fd-message-box-body>
 * ```
 */
declare class MessageBoxBodyComponent {
    private messageBox?;
    /** @hidden */
    get messageBoxConfig(): MessageBoxConfig;
    /** @hidden */
    constructor(messageBox?: MessageBoxHost | undefined);
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxBodyComponent, [{ optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxBodyComponent, "fd-message-box-body", never, {}, {}, never, ["*"], true, never>;
}

declare class MessageBoxContent extends DialogContentBase<TemplateRef<any> | string> {
}

type MessageBoxContentType = Type<any> | TemplateRef<any> | MessageBoxContent;

declare class MessageBoxRef<T = any> extends DialogRefBase<T> {
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxRef<any>, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MessageBoxRef<any>>;
}

/** Message box container where the message box content is embedded. */
declare class MessageBoxContainerComponent extends DynamicComponentContainer<MessageBoxContentType> implements DialogContainer<any>, AfterViewInit, CssClassBuilder {
    messageBoxConfig: MessageBoxConfig;
    ref: MessageBoxRef;
    private _destroyRef;
    private readonly _cdr;
    /** Custom classes */
    set class(userClass: string);
    /** @hidden */
    portalOutlet: CdkPortalOutlet;
    /** @hidden */
    private _class;
    /** @hidden Tracks the current animation phase for lifecycle management. */
    private _animationStateSignal;
    /** @hidden Reference to the current Web Animation for cleanup. */
    private _currentAnimation;
    /** @hidden */
    constructor(messageBoxConfig: MessageBoxConfig, ref: MessageBoxRef, _destroyRef: DestroyRef, elementRef: ElementRef, _cdr: ChangeDetectorRef, injector: Injector);
    /** @hidden */
    buildComponentCssClass(): string[];
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    protected _attached(event: CdkPortalOutletAttachedRef): void;
    /** @hidden Load received content */
    protected _loadContent(): void;
    /** @hidden Returns context for embedded template*/
    private _templateContext;
    /** @hidden Load Dialog component from passed object */
    private _createFromDefaultMessageBox;
    /** @hidden Animate the message box container entrance (opacity 0 → 1). */
    private _enter;
    /** @hidden Animate the message box container exit (opacity 1 → 0). */
    private _exit;
    /**
     * @hidden
     * Listen for message box close/dismiss and trigger exit animation.
     */
    private _listenOnClose;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxContainerComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxContainerComponent, "fd-message-box-container", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
}

/** Message box component used to create the message box in object based approach */
declare class MessageBoxDefaultComponent implements OnInit, AfterViewInit {
    _messageBoxConfig: MessageBoxConfig;
    private _changeDetectorRef;
    /** @hidden */
    _textContentTemplate: TemplateRef<any>;
    /** @hidden */
    _contentTemplate: TemplateRef<any>;
    /** @hidden */
    _messageBoxContent: MessageBoxContent | null;
    /** @hidden */
    _footerVisible: boolean;
    /**
     * message box title id
     * if not set, a default value is provided
     */
    messageBoxTitleId: string;
    /**
     * message box content id
     * if not set, a default value is provided
     */
    messageBoxContentId: string;
    /** @hidden */
    constructor(_messageBoxConfig: MessageBoxConfig, _changeDetectorRef: ChangeDetectorRef);
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    _onCloseButton(): void;
    /** @hidden */
    _onApproveButton(): void;
    /** @hidden */
    _onCancelButton(): void;
    /** @hidden */
    private _setContentTemplate;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxDefaultComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxDefaultComponent, "fd-message-box-default", never, {}, {}, never, never, true, never>;
}

declare const MessageBoxButtonClass = "fd-message-box__decisive-button";
/**
 * Building block of the message box used to create message box header.
 *
 * ```html
 * <fd-message-box-footer><!--Content--></fd-message-box-footer>
 *
 * Complex footer:
 * <fd-message-box-footer>
 *     <ng-template fdkTemplate="footer"><!--Content--></ng-template>
 * </fd-message-box-footer>
 * ```
 * */
declare class MessageBoxFooterComponent extends DialogFooterBase implements AfterViewInit {
    /** @hidden */
    get messageBoxConfig(): MessageBoxConfig;
    private readonly messageBox;
    /** @hidden */
    ngAfterViewInit(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxFooterComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxFooterComponent, "fd-message-box-footer", never, {}, {}, never, ["*"], true, never>;
}

/**
 * Message box element representing the semantic icon in the message box header.
 *
 * ```html
 * <fd-message-box-semantic-icon></fd-message-box-semantic-icon>
 * ```
 */
declare class MessageBoxSemanticIconComponent {
    private messageBox?;
    /** Custom semantic icon */
    glyph: string;
    /** Glyph font family */
    glyphFont: IconFont;
    /** @hidden */
    get messageBoxConfig(): MessageBoxConfig;
    /** @hidden */
    constructor(messageBox?: MessageBoxHost | undefined);
    /** @hidden */
    get _showSemanticIcon(): boolean;
    /** @hidden */
    get _getIcon(): string;
    /** @hidden */
    get _semanticIcon(): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxSemanticIconComponent, [{ optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxSemanticIconComponent, "fd-message-box-semantic-icon", never, { "glyph": { "alias": "glyph"; "required": false; }; "glyphFont": { "alias": "glyphFont"; "required": false; }; }, {}, never, never, true, never>;
}

/**
 * Building block of the message box used to create message box header.
 *
 * ```html
 * <fd-message-box-header>
 *     <fd-message-box-semantic-icon></fd-message-box-semantic-icon>
 *     <h1 fd-title><!-- Content --></h1>
 * </fd-message-box-header>
 *
 * Complex header:
 * <fd-message-box-header>
 *     <ng-template fdkTemplate="header"><!--Content--></ng-template>
 *     <ng-template fdkTemplate="subheader"><!--Content--></ng-template>
 * </fd-message-box-header>
 * ```
 */
declare class MessageBoxHeaderComponent extends DialogHeaderBase implements AfterViewInit {
    /** @hidden */
    defaultTemplateHeaderBar?: ElementRef<Element>;
    /** @hidden */
    _projectedSemanticIcon: MessageBoxSemanticIconComponent;
    /** @hidden */
    get messageBoxConfig(): MessageBoxConfig;
    /** @hidden */
    private readonly _cdr;
    /** @hidden */
    private readonly _messageBox;
    /** @hidden */
    get _showSemanticIcon(): boolean;
    /** @hidden */
    ngAfterViewInit(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxHeaderComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxHeaderComponent, "fd-message-box-header", never, {}, {}, ["_projectedSemanticIcon"], ["fd-message-box-semantic-icon", "[fd-title]"], true, never>;
}

/**
 * Message box component.
 *
 * ```html
 * <fd-message-box>
 *      <fd-message-box-header></fd-message-box-header>
 *      <fd-message-box-body></fd-message-box-body>
 *      <fd-message-box-footer></fd-message-box-footer>
 * </fd-message-box>
 * ```
 */
declare class MessageBoxComponent extends DialogBase implements AfterViewInit, OnInit, OnChanges, OnDestroy, CssClassBuilder, MessageBoxHost {
    _messageBoxConfig: MessageBoxConfig;
    private _messageBoxRef;
    /** Custom classes */
    set class(userClass: string);
    /** MessageBoxRef - should be used for Template based Dialog implementation  */
    set embeddedMessageBoxRef(value: MessageBoxRef);
    /** MessageBoxConfig - should be used for Template based Dialog implementation  */
    set embeddedMessageBoxConfig(value: MessageBoxConfig);
    /** @hidden */
    dialogWindow: ElementRef;
    /** @hidden */
    get _config(): MessageBoxConfig;
    /** @hidden */
    get _ref(): MessageBoxRef;
    /** @hidden */
    private _class;
    /** @hidden */
    constructor(_messageBoxConfig: MessageBoxConfig, _messageBoxRef: MessageBoxRef);
    /** @hidden */
    buildComponentCssClass(): string[];
    /** @hidden */
    ngOnInit(): void;
    /** @hidden */
    ngOnChanges(): void;
    /** @hidden */
    ngAfterViewInit(): void;
    /** @hidden */
    ngOnDestroy(): void;
    /** @hidden */
    private get _messageBoxTypeClass();
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxComponent, [{ optional: true; }, { optional: true; }]>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageBoxComponent, "fd-message-box", never, { "class": { "alias": "class"; "required": false; }; "embeddedMessageBoxRef": { "alias": "messageBoxRef"; "required": false; }; "embeddedMessageBoxConfig": { "alias": "messageBoxConfig"; "required": false; }; }, {}, never, ["fd-message-box-header", "fd-message-box-body", "fd-message-box-footer"], true, never>;
}

interface MessageBoxTemplateDirectiveContext<T = MessageBoxConfig<any>, U = T extends MessageBoxConfig<infer P> ? P : any> {
    $implicit: MessageBoxRef<U>;
    messageBoxConfig: T;
}
declare class MessageBoxTemplateDirective<T = MessageBoxConfig<any>> {
    /** Custom dialog config model. */
    fdMessageBoxTemplateConfig: T;
    /** @hidden */
    readonly templateRef: TemplateRef<any>;
    /** @hidden */
    static ngTemplateContextGuard<T extends null>(dir: MessageBoxTemplateDirective<T>, ctx: MessageBoxTemplateDirectiveContext<MessageBoxConfig<any>>): ctx is MessageBoxTemplateDirectiveContext<MessageBoxConfig<any>>;
    /** @hidden */
    static ngTemplateContextGuard<T = MessageBoxConfig<any>>(dir: MessageBoxTemplateDirective<T>, ctx: MessageBoxTemplateDirectiveContext<T>): ctx is MessageBoxTemplateDirectiveContext<T>;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxTemplateDirective<any>, never>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<MessageBoxTemplateDirective<any>, "[fdMessageBoxTemplate]", never, { "fdMessageBoxTemplateConfig": { "alias": "fdMessageBoxTemplateConfig"; "required": false; }; }, {}, never, never, true, never>;
}

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
declare class MessageBoxModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<MessageBoxModule, never, [typeof i1.TemplateDirective, typeof i1.InitialFocusModule, typeof i2.TitleComponent, typeof MessageBoxSemanticIconComponent, typeof MessageBoxContainerComponent, typeof MessageBoxDefaultComponent, typeof MessageBoxFooterComponent, typeof MessageBoxHeaderComponent, typeof MessageBoxBodyComponent, typeof MessageBoxComponent, typeof MessageBoxTemplateDirective], [typeof MessageBoxSemanticIconComponent, typeof MessageBoxContainerComponent, typeof MessageBoxDefaultComponent, typeof MessageBoxFooterComponent, typeof MessageBoxHeaderComponent, typeof MessageBoxBodyComponent, typeof MessageBoxComponent, typeof MessageBoxTemplateDirective, typeof i1.TemplateDirective, typeof i1.InitialFocusModule, typeof i2.TitleComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<MessageBoxModule>;
}

/** Service used to create a message box. */
declare class MessageBoxService extends DialogBaseService<MessageBoxContainerComponent> {
    private _defaultConfig;
    private _rtlService;
    private readonly _overlay;
    /** @hidden */
    constructor(_defaultConfig: MessageBoxConfig, _rtlService: RtlService, _overlay: Overlay);
    /**
     * Opens a message box component with provided content.
     * @param content Content of the message box component.
     * @param config Configuration of the message box component.
     */
    open<T = any>(content: MessageBoxContentType, config?: MessageBoxConfig<T>): MessageBoxRef<T>;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageBoxService, [{ optional: true; }, { optional: true; }, null]>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MessageBoxService>;
}

export { MESSAGE_BOX_DEFAULT_CONFIG, MessageBoxBodyComponent, MessageBoxButtonClass, MessageBoxComponent, MessageBoxConfig, MessageBoxContainerComponent, MessageBoxContent, MessageBoxDefaultComponent, MessageBoxFooterComponent, MessageBoxHeaderComponent, MessageBoxHost, MessageBoxModule, MessageBoxRef, MessageBoxSemanticIconComponent, MessageBoxService, MessageBoxTemplateDirective };
export type { MessageBoxContentType, MessageBoxTemplateDirectiveContext, MessageBoxType };
