import { ComponentFactoryResolver, ComponentRef } from '@angular/core';
import { RToastrContainerComponent } from './toastr-container.component';
import { RToastrConfig } from './toastr-config';
import { RToast } from './model';
import { RToastComponent } from './toast.component';
import { RGlobalLogicalPosition, RGlobalPosition, RPositionHelper } from '../../../cdk/overlay/position-helper';
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
import { RPositionBuilderService } from '../../../cdk/overlay/overlay-position';
export declare class RToastRef {
    private toastContainer;
    private toast;
    constructor(toastContainer: RToastContainer, toast: RToast);
    close(): void;
}
export declare class RToastContainer {
    protected position: RGlobalPosition;
    protected containerRef: ComponentRef<RToastrContainerComponent>;
    protected positionHelper: RPositionHelper;
    protected toasts: RToast[];
    protected prevToast: RToast;
    get nativeElement(): any;
    constructor(position: RGlobalPosition, containerRef: ComponentRef<RToastrContainerComponent>, positionHelper: RPositionHelper);
    attach(toast: RToast): RToastRef;
    destroy(toast: RToast): void;
    protected isDuplicate(toast: RToast): boolean;
    protected isDuplicatePrevious(toast: RToast): boolean;
    protected isDuplicateAmongAll(toast: RToast): boolean;
    protected toastDuplicateCompareFunc: (t1: RToast, t2: RToast) => boolean;
    protected removeToastIfLimitReached(toast: RToast): void;
    protected attachToast(toast: RToast): RToastComponent;
    protected attachToTop(toast: RToast): RToastComponent;
    protected attachToBottom(toast: RToast): RToastComponent;
    protected setDestroyTimeout(toast: RToast): void;
    protected subscribeOnClick(toastComponent: RToastComponent, toast: RToast): void;
    protected updateContainer(): void;
}
interface RToastrOverlayWithContainer {
    overlayRef: OverlayRef;
    toastrContainer: RToastContainer;
}
export declare class RToastrContainerRegistry {
    protected overlay: Overlay;
    protected positionBuilder: RPositionBuilderService;
    protected positionHelper: RPositionHelper;
    protected cfr: ComponentFactoryResolver;
    protected document: any;
    protected overlays: Map<RGlobalPosition, RToastrOverlayWithContainer>;
    constructor(overlay: Overlay, positionBuilder: RPositionBuilderService, positionHelper: RPositionHelper, cfr: ComponentFactoryResolver, document: any);
    get(position: RGlobalPosition): RToastContainer;
    protected instantiateContainer(position: RGlobalLogicalPosition): void;
    protected createContainer(position: RGlobalLogicalPosition): RToastrOverlayWithContainer;
    protected addClassToOverlayHost(overlayRef: OverlayRef): void;
    protected existsInDom(toastContainer: RToastContainer): boolean;
}
/**
 * The `RToastrService` provides a capability to build toast notifications.
 *
 * @stacked-example(Showcase, toastr/toastr-showcase.component)
 *
 * `RToastrService.show(message, title, config)` accepts three params, title and config are optional.
 *
 * ### Installation
 *
 * Import `RToastrModule.forRoot()` to your app module.
 * ```ts
 * @NgModule({
 *   imports: [
 *     // ...
 *     RToastrModule.forRoot(config),
 *   ],
 * })
 * export class AppModule { }
 * ```
 *
 * ### Usage
 *
 * Calling `RToastrService.show(...)` will render new toast and return `RToastrRef` with
 * help of which you may close newly created toast by calling `close` method.
 *
 * ```ts
 * const toastRef: RToastRef = this.toastrService.show(...);
 * toastRef.close();
 * ```
 *
 * Config accepts following options:
 *
 * `position` - determines where on the screen toast will be rendered.
 * Default is `top-end`.
 *
 * @stacked-example(Position, toastr/toastr-positions.component)
 *
 * `status` - coloring and icon of the toast.
 * Default is `basic`.
 *
 * @stacked-example(Status, toastr/toastr-statuses.component)
 *
 * `duration` - the time after which the toast will be destroyed.
 * `0` means endless toast, that may be destroyed by click only.
 * Default is 3000 ms.
 *
 * @stacked-example(Duration, toastr/toastr-duration.component)
 *
 * `destroyByClick` - provides a capability to destroy toast by click.
 * Default is true.
 *
 * @stacked-example(Destroy by click, toastr/toastr-destroy-by-click.component)
 *
 * `preventDuplicates` - don't create new toast if it has the same title, message and status.
 * Default is false.
 *
 * @stacked-example(Prevent duplicates, toastr/toastr-prevent-duplicates.component)
 *
 * `duplicatesBehaviour` - determines how to treat the toasts duplication.
 * Compare with the previous message `previous`
 * or with all visible messages `all`.
 *
 * @stacked-example(Prevent duplicates behaviour , toastr/toastr-prevent-duplicates-behaviour.component)
 *
 * `limit` - the number of visible toasts in the toast container. The number of toasts is unlimited by default.
 *
 * @stacked-example(Prevent duplicates behaviour , toastr/toastr-limit.component)
 *
 * `hasIcon` - if true then render toast icon.
 * `icon` - you can pass icon class that will be applied into the toast.
 *
 * @stacked-example(Has icon, toastr/toastr-icon.component)
 * */
export declare class RToastrService {
    protected globalConfig: RToastrConfig;
    protected containerRegistry: RToastrContainerRegistry;
    constructor(globalConfig: RToastrConfig, containerRegistry: RToastrContainerRegistry);
    /**
     * Shows toast with message, title and user config.
     * */
    show(message: any, title?: any, userConfig?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows success toast with message, title and user config.
     * */
    success(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows info toast with message, title and user config.
     * */
    info(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows warning toast with message, title and user config.
     * */
    warning(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows primary toast with message, title and user config.
     * */
    primary(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows danger toast with message, title and user config.
     * */
    danger(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows default toast with message, title and user config.
     * */
    default(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
    /**
     * Shows control toast with message, title and user config.
     * */
    control(message: any, title?: any, config?: Partial<RToastrConfig>): RToastRef;
}
export {};
