import { NgModule, SkipSelf, Optional, } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Toast } from './toast-component';
import { TOAST_CONFIG } from './toast-token';
import { ToastrService } from './toastr-service';
import { OverlayContainer } from '../overlay/overlay-container';
import { Overlay } from '../overlay/overlay';
var ToastrModule = (function () {
    function ToastrModule(parentModule) {
        if (parentModule) {
            throw new Error('ToastrModule is already loaded. It should only be imported in your application\'s main module.');
        }
    }
    ToastrModule.forRoot = function (config) {
        return {
            ngModule: ToastrModule,
            providers: [
                { provide: TOAST_CONFIG, useValue: config },
                OverlayContainer,
                Overlay,
                ToastrService,
            ]
        };
    };
    return ToastrModule;
}());
export { ToastrModule };
ToastrModule.decorators = [
    { type: NgModule, args: [{
                imports: [CommonModule],
                exports: [Toast],
                declarations: [Toast],
                entryComponents: [Toast],
            },] },
];
ToastrModule.ctorParameters = function () { return [
    { type: ToastrModule, decorators: [{ type: Optional }, { type: SkipSelf },] },
]; };
//# sourceMappingURL=toastr-module.js.map