import { BaseToastDurationDismissibleConfig, BaseToastDurationDismissibleContainerComponent, BaseToastDurationDismissibleRef, BaseToastPosition, ToastTextComponent, BaseDismissibleToastService, ToastBottomCenterPosition } from '@fundamental-ngx/cdk/utils';
import * as rxjs from 'rxjs';
import * as i2 from '@angular/cdk/overlay';
import { OverlayRef, OverlayContainer } from '@angular/cdk/overlay';
import * as i0 from '@angular/core';
import { InjectionToken, ModuleWithProviders, Type, TemplateRef, EmbeddedViewRef, StaticProvider, Provider } from '@angular/core';
import * as i1 from '@angular/cdk/portal';

/**
 * Configuration used when opening a Message Toast.
 */
declare class MessageToastConfig<T = any> extends BaseToastDurationDismissibleConfig<T> {
    /** Whether the Message Toast should be animated. */
    animated?: boolean | undefined;
}

declare class MessageToastComponent extends BaseToastDurationDismissibleContainerComponent<MessageToastConfig> {
    /** @hidden */
    constructor();
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageToastComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageToastComponent, "fd-message-toast", never, {}, {}, never, never, true, never>;
}

declare class MessageToastRef<T = any> extends BaseToastDurationDismissibleRef<T, MessageToastConfig> {
    containerInstance: MessageToastComponent;
    overlayRef: OverlayRef;
    positionStrategy: BaseToastPosition;
    /** Observable that is triggered when the message toast has timed out. */
    afterTimeout: rxjs.Observable<void>;
    /** Data passed from the service open method. */
    readonly data: T;
    /** @hidden */
    constructor(containerInstance: MessageToastComponent, overlayRef: OverlayRef, positionStrategy: BaseToastPosition);
}

declare class MessageToastTextComponent implements ToastTextComponent {
    /** @hidden */
    readonly toastRef: MessageToastRef<MessageToastTextComponent>;
    /** @hidden */
    readonly message: string;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageToastTextComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MessageToastTextComponent, "fd-message-toast-text", never, {}, {}, never, never, true, never>;
}

/** Injection token that can be used to access the data that was passed in to a Message Toast. */

declare const MESSAGE_TOAST_DATA: InjectionToken<any>;
declare const MESSAGE_TOAST_CONFIG: InjectionToken<MessageToastConfig<any>>;

/**
 * @deprecated
 * Use direct imports of components and directives.
 */
declare class MessageToastModule {
    /**
     * Allows configuring module on a global level with custom configuration.
     * @param config User's custom configuration.
     */
    static withConfig(config: MessageToastConfig): ModuleWithProviders<MessageToastModule>;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageToastModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<MessageToastModule, never, [typeof i1.PortalModule, typeof i2.OverlayModule, typeof MessageToastComponent, typeof MessageToastTextComponent], [typeof MessageToastComponent]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<MessageToastModule>;
}

declare class MessageToastService<P = any> extends BaseDismissibleToastService<MessageToastConfig<P>> {
    /** @hidden */
    protected toastTextComponent: typeof MessageToastTextComponent;
    /** @hidden */
    protected toastContainerComponent: typeof MessageToastComponent;
    /** @hidden */
    protected toastDataInjectionToken: i0.InjectionToken<any>;
    /** @hidden */
    protected toastPositionStrategy: typeof ToastBottomCenterPosition;
    /** @hidden */
    protected defaultConfig: MessageToastConfig<any>;
    /**
     * Opens toast with a provided message.
     * @param message Message to display in a Message Toast.
     * @param config Toast configuration.
     * @returns Toast reference.
     */
    open<T = any>(message: string | Type<T> | TemplateRef<any>, config?: MessageToastConfig<P>): MessageToastRef<MessageToastTextComponent | T | EmbeddedViewRef<any>>;
    /**
     * Opens a Toast with provided message as a content.
     * @param message string to render inside a Toast.
     * @param config Toast configuration
     */
    openFromString(message: string, config?: MessageToastConfig<P>): MessageToastRef<MessageToastTextComponent>;
    /**
     * Opens a Toast with provided component inside.
     * @param component Component to render inside a Toast.
     * @param config Toast configuration.
     * @returns Toast reference.
     */
    openFromComponent<T>(component: Type<T>, config: MessageToastConfig<P>): MessageToastRef<T>;
    /**
     * Opens a Toast with provided Template Reference.
     * @param template Template Reference to render inside a Toast.
     * @param config Toast configuration.
     * @returns Toast reference.
     */
    openFromTemplate(template: TemplateRef<any>, config: MessageToastConfig<P>): MessageToastRef<EmbeddedViewRef<any>>;
    /** @hidden */
    protected getContainerComponentProviders(config: MessageToastConfig<P>): StaticProvider[];
    /** @hidden */
    protected getContentComponentProviders<T>(config: MessageToastConfig<P>, messageToastRef: MessageToastRef<T>): StaticProvider[];
    /** @hidden */
    protected getToastRef<T>(containerRef: MessageToastComponent, overlayRef: OverlayRef, positionStrategy?: BaseToastPosition): MessageToastRef<T | EmbeddedViewRef<any>>;
    static ɵfac: i0.ɵɵFactoryDeclaration<MessageToastService<any>, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<MessageToastService<any>>;
}

/**
 * Function allows to provide custom configuration for Message Toast.
 * @param config
 * @returns
 */
declare function provideMessageToastConfig(config: MessageToastConfig): Provider;

/**
 * Custom overlay container for CDK Overlay.
 */
declare class ToastOverlayContainer extends OverlayContainer {
    /**
     * This method returns the overlay container element. It will lazily
     * create the element the first time it is called to facilitate using
     * the container in non-browser environments.
     * @returns the container element
     */
    getContainerElement(): HTMLElement;
    static ɵfac: i0.ɵɵFactoryDeclaration<ToastOverlayContainer, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<ToastOverlayContainer>;
}

export { MESSAGE_TOAST_CONFIG, MESSAGE_TOAST_DATA, MessageToastComponent, MessageToastConfig, MessageToastModule, MessageToastRef, MessageToastService, MessageToastTextComponent, ToastOverlayContainer, provideMessageToastConfig };
