import { Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, Injectable, Injector, ApplicationRef, Optional, ComponentFactoryResolver, NgZone, ChangeDetectorRef, Input, ViewChild, NgModule } from '@angular/core';
import { trigger, transition, query, group, style, stagger, animate } from '@angular/animations';
import { Localize, LocalizeModule } from '@bravobit/bb-foundation/localize';
import { Platform } from '@bravobit/bb-foundation';
import { BehaviorSubject } from 'rxjs';
import { share } from 'rxjs/operators';
import { CommonModule } from '@angular/common';

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications.interfaces.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function Notification() { }
if (false) {
    /** @type {?} */
    Notification.prototype.content;
    /** @type {?|undefined} */
    Notification.prototype.id;
    /** @type {?|undefined} */
    Notification.prototype.timeout;
    /** @type {?|undefined} */
    Notification.prototype.localize;
    /** @type {?|undefined} */
    Notification.prototype.dismiss;
    /** @type {?|undefined} */
    Notification.prototype.dismissText;
    /** @type {?|undefined} */
    Notification.prototype.data;
    /** @type {?|undefined} */
    Notification.prototype.type;
    /** @type {?|undefined} */
    Notification.prototype.actions;
    /** @type {?|undefined} */
    Notification.prototype.color;
    /** @type {?|undefined} */
    Notification.prototype.backgroundColor;
    /** @type {?|undefined} */
    Notification.prototype.destroy;
}
/**
 * @record
 */
function NotificationAction() { }
if (false) {
    /** @type {?} */
    NotificationAction.prototype.title;
    /** @type {?|undefined} */
    NotificationAction.prototype.callback;
    /** @type {?|undefined} */
    NotificationAction.prototype.type;
}
/** @enum {string} */
const NotificationType = {
    Success: "success",
    Error: "error",
    Warning: "warning",
    Info: "info",
    Custom: "custom",
};
class NotificationsConfig {
}
if (false) {
    /** @type {?} */
    NotificationsConfig.prototype.mode;
    /** @type {?} */
    NotificationsConfig.prototype.position;
    /** @type {?} */
    NotificationsConfig.prototype.timeout;
    /** @type {?} */
    NotificationsConfig.prototype.dismiss;
    /** @type {?} */
    NotificationsConfig.prototype.localize;
    /** @type {?} */
    NotificationsConfig.prototype.dismissText;
}
/** @enum {string} */
const NotificationsPosition = {
    TopRight: "flex-start|flex-end",
    BottomRight: "flex-end|flex-end",
    TopLeft: "flex-start|flex-start",
    BottomLeft: "flex-end|flex-start",
};
class NotificationsData {
}
if (false) {
    /** @type {?} */
    NotificationsData.prototype.data;
    /** @type {?} */
    NotificationsData.prototype.dismissText;
    /** @type {?} */
    NotificationsData.prototype.position;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications.animations.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
const s = '250ms cubic-bezier(0, 0, .2, 1)';
/** @type {?} */
const l = '400ms cubic-bezier(0, 0, .2, 1)';
/** @type {?} */
const notificationAnimation = trigger('notificationListAnimation', [
    transition('* => *', [
        query(':enter', group([
            // 1. Set the initial state.
            style({ height: 0, opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)' }),
            // 2. Start the animation to show the item.
            stagger(0, [
                animate(s, style({ height: '*' })),
                animate(l, style({ opacity: 1, transform: 'translateX(0) scale(0.95)' })),
                animate(s, style({ transform: 'translateX(0) scale(1)' }))
            ])
        ]), { optional: true }),
        query(':leave', group([
            // 1. Set the initial state.
            style({ height: '*', opacity: 1, transform: 'translateX(0) scale(1)' }),
            // 2. Start the animation to hide the item.
            stagger(0, [
                animate(s, style({ transform: 'translateX(0) scale(0.95)' })),
                animate(l, style({ opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)' })),
                animate(s, style({ height: 0 }))
            ])
        ]), { optional: true })
    ])
]);

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications-list/notifications-list.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbNotificationsList {
    /**
     * @param {?} data
     */
    constructor(data) {
        this.data = data;
        // Data.
        this.position = null;
        // Track by function.
        this.trackByFn = (/**
         * @param {?} _
         * @param {?} item
         * @return {?}
         */
        (_, item) => item.id);
    }
    /**
     * @return {?}
     */
    get horizontalPosition() {
        return this.location.horizontal;
    }
    /**
     * @return {?}
     */
    get verticalPosition() {
        return this.location.vertical;
    }
    /**
     * @return {?}
     */
    get animation() {
        /** @type {?} */
        const to = this.horizontalPosition === 'flex-start'
            ? -50
            : 50;
        return { to };
    }
    /**
     * @private
     * @return {?}
     */
    get location() {
        const [y, x] = (this.data.position || '').split('|');
        return { vertical: y || null, horizontal: x || null };
    }
}
BbNotificationsList.decorators = [
    { type: Component, args: [{
                selector: 'bb-notifications-list',
                template: "<!--\r\n    The notifications list.\r\n\r\n    The list provides the animation effect for the\r\n    incoming notifications.\r\n-->\r\n<div *ngIf=\"data?.data | async as notifications\"\r\n     [@notificationListAnimation]=\"{value: notifications?.length, params: animation}\"\r\n     class=\"notifications-list-wrapper\">\r\n    <!--\r\n        The loop for the notifications.\r\n\r\n        All notifications will be displayed here. They\r\n        are wrapped within a wrapper which separates them.\r\n    -->\r\n    <div *ngFor=\"let notification of notifications; trackBy: trackByFn\"\r\n         class=\"notifications-item-wrapper\">\r\n        <bb-notifications-item [notification]=\"notification\"\r\n                               [dismissButtonText]=\"data?.dismissText\">\r\n        </bb-notifications-item>\r\n    </div>\r\n</div>\r\n",
                animations: [notificationAnimation],
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                preserveWhitespaces: false,
                host: {
                    'class': 'bb-notifications-list',
                    'role': 'list'
                },
                styles: [".bb-notifications-list{top:0;left:0;right:0;bottom:0;z-index:1100;padding:10px;display:-ms-flexbox;display:flex;position:fixed;pointer-events:none}.notifications-list-wrapper{width:100%;display:block;max-width:400px;position:relative}.notifications-item-wrapper{padding:0;margin:0 0 10px;pointer-events:all}"]
            }] }
];
/** @nocollapse */
BbNotificationsList.ctorParameters = () => [
    { type: NotificationsData }
];
BbNotificationsList.propDecorators = {
    horizontalPosition: [{ type: HostBinding, args: ['style.justify-content',] }],
    verticalPosition: [{ type: HostBinding, args: ['style.align-items',] }]
};
if (false) {
    /** @type {?} */
    BbNotificationsList.prototype.position;
    /** @type {?} */
    BbNotificationsList.prototype.trackByFn;
    /** @type {?} */
    BbNotificationsList.prototype.data;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications.injector.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class NotificationsInjector {
    /**
     * @param {?} _parentInjector
     * @param {?} _additionalTokens
     */
    constructor(_parentInjector, _additionalTokens) {
        this._parentInjector = _parentInjector;
        this._additionalTokens = _additionalTokens;
    }
    /**
     * @param {?} token
     * @param {?=} notFoundValue
     * @return {?}
     */
    get(token, notFoundValue) {
        // First check if the additional token
        // contains the token.
        /** @type {?} */
        const value = this._additionalTokens.get(token);
        // If that value exists return it.
        if (value) {
            return value;
        }
        // Else query the parent injector.
        return this._parentInjector.get(token, notFoundValue);
    }
}
if (false) {
    /**
     * @type {?}
     * @private
     */
    NotificationsInjector.prototype._parentInjector;
    /**
     * @type {?}
     * @private
     */
    NotificationsInjector.prototype._additionalTokens;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications.service.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class Notifications {
    /**
     * @param {?} _injector
     * @param {?} _platform
     * @param {?} _applicationRef
     * @param {?} _localize
     * @param {?} _config
     * @param {?} _componentFactoryResolver
     */
    constructor(_injector, _platform, _applicationRef, _localize, _config, _componentFactoryResolver) {
        this._injector = _injector;
        this._platform = _platform;
        this._applicationRef = _applicationRef;
        this._localize = _localize;
        this._config = _config;
        this._componentFactoryResolver = _componentFactoryResolver;
        // The data containing the notifications.
        this._notifications$ = new BehaviorSubject([]);
        this.getProperty = (/**
         * @param {?} property
         * @param {?} defaultValue
         * @return {?}
         */
        (property, defaultValue) => {
            return typeof property === 'undefined'
                ? defaultValue
                : property;
        });
        // Get the config.
        /** @type {?} */
        const config = this._config || {};
        // Set the config.
        this._defaultMode = this.getProperty(config.mode, 'prepend');
        this._defaultTimeout = this.getProperty(config.timeout, 8000);
        this._defaultLocalize = this.getProperty(config.localize, false);
        this._defaultDismiss = this.getProperty(config.dismiss, true);
        this._defaultDismissText = this.getProperty(config.dismissText, 'Dismiss');
        this._defaultPosition = this.getProperty(config.position, NotificationsPosition.TopRight);
        // Create the element that holds all notifications.
        this.createElement();
    }
    /**
     * @param {?} content
     * @param {?=} actions
     * @param {?=} timeout
     * @return {?}
     */
    success(content, actions = [], timeout = this._defaultTimeout) {
        return this.create({ content, timeout, actions, type: NotificationType.Success });
    }
    /**
     * @param {?} content
     * @param {?=} actions
     * @param {?=} timeout
     * @return {?}
     */
    error(content, actions = [], timeout = this._defaultTimeout) {
        return this.create({ content, timeout, actions, type: NotificationType.Error });
    }
    /**
     * @param {?} content
     * @param {?=} actions
     * @param {?=} timeout
     * @return {?}
     */
    warn(content, actions = [], timeout = this._defaultTimeout) {
        return this.create({ content, timeout, actions, type: NotificationType.Warning });
    }
    /**
     * @param {?} content
     * @param {?=} actions
     * @param {?=} timeout
     * @return {?}
     */
    info(content, actions = [], timeout = this._defaultTimeout) {
        return this.create({ content, timeout, actions, type: NotificationType.Info });
    }
    /**
     * @param {?} notification
     * @return {?}
     */
    create(notification) {
        // Compose a new notification item.
        /** @type {?} */
        const item = this.compose(notification);
        // Add the destroy function to the notification.
        item.destroy = (/**
         * @return {?}
         */
        () => this.pull(item));
        // Add the notification to the list
        // and return the item.
        return this.push(item);
    }
    /**
     * @private
     * @param {?} notification
     * @return {?}
     */
    push(notification) {
        // Get the current list.
        /** @type {?} */
        const oldList = this._notifications$.getValue();
        // Check which mode is activated.
        /** @type {?} */
        let newList = [...oldList];
        switch (this._defaultMode) {
            case 'append':
                newList = [...oldList, notification];
                break;
            case 'prepend':
            default:
                newList = [notification, ...oldList];
        }
        // Push the new notifications.
        this._notifications$.next(newList);
        // Return the notification for further use.
        return notification;
    }
    /**
     * @private
     * @param {?} notification
     * @return {?}
     */
    pull(notification) {
        // Get the current list.
        /** @type {?} */
        const newList = this._notifications$
            .getValue()
            .filter((/**
         * @param {?} item
         * @return {?}
         */
        item => item.id !== notification.id));
        // Push a new list.
        this._notifications$.next(newList);
    }
    /**
     * @private
     * @param {?} notification
     * @return {?}
     */
    compose(notification) {
        // Attach a random id to the notification.
        notification.id = Math.random().toString(36).substr(2, 10);
        // Set all properties.
        notification.type = this.getProperty(notification.type, NotificationType.Custom);
        notification.content = this.getProperty(notification.content, null);
        notification.data = this.getProperty(notification.data, {});
        notification.timeout = this.getProperty(notification.timeout, this._defaultTimeout);
        notification.localize = this.getProperty(notification.localize, this._defaultLocalize);
        notification.dismiss = this.getProperty(notification.dismiss, this._defaultDismiss);
        // Dismiss text localization.
        /** @type {?} */
        const dismissText = this.getProperty(notification.dismissText, this._defaultDismissText);
        notification.dismissText = this._defaultLocalize && this._localize
            ? this._localize.translate(dismissText)
            : dismissText;
        // Return the composed notification.
        return notification;
    }
    /**
     * @private
     * @return {?}
     */
    createElement() {
        // Create a map with the config.
        /** @type {?} */
        const map = new WeakMap();
        map.set(NotificationsData, {
            data: this._notifications$.pipe(share()),
            dismissText: this._defaultDismissText,
            position: this._defaultPosition
        });
        // Create a custom injector.
        /** @type {?} */
        const notificationsInjector = new NotificationsInjector(this._injector, map);
        // Create the notification list and
        // get a reference to the component.
        this._ref = this._componentFactoryResolver
            .resolveComponentFactory(BbNotificationsList)
            .create(notificationsInjector);
        // Detect the changes.
        this._ref.changeDetectorRef.detectChanges();
        // Attach the component's view to the application
        // so that the change detection will run properly.
        this._applicationRef.attachView(this._ref.hostView);
        // If the platform is not a browser return.
        if (!this._platform.isBrowser) {
            return;
        }
        try {
            // Append the element to the DOM.
            document.body.appendChild(this._ref.location.nativeElement);
        }
        catch (_a) {
            // Don't do anything, because it must've failed.
        }
    }
}
Notifications.decorators = [
    { type: Injectable }
];
/** @nocollapse */
Notifications.ctorParameters = () => [
    { type: Injector },
    { type: Platform },
    { type: ApplicationRef },
    { type: Localize, decorators: [{ type: Optional }] },
    { type: NotificationsConfig, decorators: [{ type: Optional }] },
    { type: ComponentFactoryResolver }
];
if (false) {
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._ref;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultMode;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultTimeout;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultLocalize;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultDismiss;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultDismissText;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._defaultPosition;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._notifications$;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype.getProperty;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._injector;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._platform;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._applicationRef;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._localize;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._config;
    /**
     * @type {?}
     * @private
     */
    Notifications.prototype._componentFactoryResolver;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications-item/notifications-item.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class BbNotificationsItem {
    /**
     * @param {?} _zone
     * @param {?} _platform
     * @param {?} _changeDetection
     */
    constructor(_zone, _platform, _changeDetection) {
        this._zone = _zone;
        this._platform = _platform;
        this._changeDetection = _changeDetection;
        // Data.
        this._progress = 0;
        this._count = 0;
        // Data.
        this._radius = 19;
        this._circumference = this._radius * 2 * Math.PI;
        this.callActionAndDestroy = (/**
         * @param {?} notification
         * @param {?} action
         * @return {?}
         */
        (notification, action) => {
            // Perform the callback (if it exists).
            action && action.callback && action.callback();
            // Call the destroy method (if it exists).
            notification && notification.destroy && notification.destroy();
        });
        this.instance = (/**
         * @return {?}
         */
        () => {
            // Calculate the difference.
            this._difference = (new Date().getTime() - this._startTime) - (this._count * this._speed);
            // Add up the count.
            if (this._count++ === this._steps) {
                this.notification.destroy();
            }
            // Add the steps to the progress.
            this._progress += 100 / this._steps;
            // Set a new timer.
            this._timer = this.setTimeout(this.instance, this._speed - this._difference);
            // Run a new change detection cycle.
            this._zone.run((/**
             * @return {?}
             */
            () => this._changeDetection.detectChanges()));
        });
        this.setTimeout = (/**
         * @param {?} method
         * @param {?} timeout
         * @return {?}
         */
        (method, timeout) => {
            // Check if the window and method exist.
            if (!window || !window.setTimeout) {
                return null;
            }
            return window.setTimeout(method, timeout);
        });
    }
    /**
     * @return {?}
     */
    get getClass() {
        return `bb-notifications-item ${this.notification.type}`;
    }
    /**
     * @return {?}
     */
    get progressStrokeArray() {
        /** @type {?} */
        const value = Math.floor(this._circumference);
        return `${value}, ${value}`;
    }
    /**
     * @return {?}
     */
    get progressStrokeOffset() {
        return Math.floor(this._circumference - this._progress / 100 * this._circumference);
    }
    /**
     * @return {?}
     */
    get isContentString() {
        return typeof this.notification.content === 'string';
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        // Check if the notification timeout is not 0 and the platform is a browser.
        if (this.notification.timeout <= 0 || !this._platform.isBrowser) {
            this.notification.dismiss = true;
            return;
        }
        // Start the timeout.
        this.startTimeout();
    }
    /**
     * @return {?}
     */
    ngOnDestroy() {
        // Clear the timeout if it was set.
        this._timer && window && window.clearTimeout && window.clearTimeout(this._timer);
    }
    /**
     * @private
     * @return {?}
     */
    startTimeout() {
        // Calculate the steps of the timeout.
        this._steps = this.notification.timeout / 10;
        // Calculate the speed of the timeout.
        this._speed = this.notification.timeout / this._steps;
        // Get the start time.
        this._startTime = new Date().getTime();
        // Set a new timer outside of Angular.
        this._zone.runOutsideAngular((/**
         * @return {?}
         */
        () => this._timer = this.setTimeout(this.instance, this._speed)));
    }
}
BbNotificationsItem.decorators = [
    { type: Component, args: [{
                selector: 'bb-notifications-item',
                template: "<div class=\"notification-content-wrapper\">\r\n    <!--\r\n        The icon for the notification.\r\n\r\n        The icon is reflected by the type of the\r\n        notification. Same goes for the color and\r\n        background-color.\r\n    -->\r\n    <div [style.color]=\"notification?.color\"\r\n         [style.background-color]=\"notification?.backgroundColor\"\r\n         class=\"notification-icon-wrapper\">\r\n        <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n             viewBox=\"0 0 16 19.5\"\r\n             class=\"notification-icon\">\r\n            <path\r\n                d=\"M8 19.5c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2zM14 13.5v-5c0-3.1-1.6-5.6-4.5-6.3v-.7C9.5.7 8.8 0 8 0S6.5.7 6.5 1.5v.7C3.6 2.9 2 5.4 2 8.5v5l-2 2v1h16v-1l-2-2z\">\r\n            </path>\r\n        </svg>\r\n\r\n        <!--\r\n            The circular progress for the notification.\r\n\r\n            The progress is only visible when a timeout is\r\n            set. The progress adapts to the time remaining\r\n            for the notification.\r\n        -->\r\n        <svg *ngIf=\"notification?.timeout > 0\"\r\n             class=\"notification-progress-ring\"\r\n             viewBox=\"0 0 40 40\"\r\n             role=\"progressbar\">\r\n            <circle #progress\r\n                    [attr.stroke-dasharray]=\"progressStrokeArray\"\r\n                    [attr.stroke-dashoffset]=\"progressStrokeOffset\"\r\n                    [style.stroke]=\"notification?.color\"\r\n                    class=\"notification-progress-circle\"\r\n                    stroke-width=\"2\"\r\n                    fill=\"transparent\"\r\n                    r=\"19\"\r\n                    cx=\"20\"\r\n                    cy=\"20\">\r\n            </circle>\r\n        </svg>\r\n    </div>\r\n\r\n    <!--\r\n        The content for the notification.\r\n\r\n        This displays a string or a template based\r\n        on the given parameter by the user.\r\n    -->\r\n    <div class=\"notification-content\">\r\n        <ng-container *ngIf=\"isContentString; else templateContent\"\r\n                      [ngSwitch]=\"notification?.localize\">\r\n            <ng-container *ngSwitchCase=\"true\">\r\n                {{ notification?.content | bbLocalize:{data: notification?.data} }}\r\n            </ng-container>\r\n            <ng-container *ngSwitchDefault>\r\n                {{ notification?.content }}\r\n            </ng-container>\r\n        </ng-container>\r\n    </div>\r\n</div>\r\n\r\n<!--\r\n    The actions of the notification.\r\n\r\n    All actions are displayed here and are\r\n    based on the actions array the user provided.\r\n-->\r\n<div *ngIf=\"notification?.actions?.length > 0 || notification?.dismiss\"\r\n     class=\"notification-actions\">\r\n    <button *ngFor=\"let action of notification?.actions\"\r\n            (click)=\"callActionAndDestroy(notification, action)\"\r\n            type=\"button\"\r\n            [class.destructive]=\"action?.type === 'cancel'\"\r\n            class=\"notification-actions-button\">\r\n        <span [ngSwitch]=\"notification?.localize\"\r\n              class=\"notification-actions-button-highlight\">\r\n            <ng-container *ngSwitchCase=\"true\">\r\n                {{ action?.title | bbLocalize:{data: notification?.data} }}\r\n            </ng-container>\r\n            <ng-container *ngSwitchDefault>\r\n                {{ action?.title }}\r\n            </ng-container>\r\n        </span>\r\n    </button>\r\n    <button *ngIf=\"notification?.dismiss\"\r\n            (click)=\"notification?.destroy()\"\r\n            class=\"notification-actions-button destructive\"\r\n            type=\"button\">\r\n        <span class=\"notification-actions-button-highlight\">\r\n            {{ notification?.dismissText || dismissButtonText }}\r\n        </span>\r\n    </button>\r\n</div>\r\n\r\n<!--\r\n    The outlet for the notification content template ref.\r\n-->\r\n<ng-template #templateContent>\r\n    <ng-container *ngTemplateOutlet=\"notification?.content\"></ng-container>\r\n</ng-template>\r\n",
                changeDetection: ChangeDetectionStrategy.OnPush,
                encapsulation: ViewEncapsulation.None,
                preserveWhitespaces: false,
                host: {
                    'role': 'alert'
                },
                styles: [".bb-notifications-item{display:-ms-flexbox;display:flex;border-radius:4px;-ms-flex-direction:column;flex-direction:column;background-color:#fff;border:1px solid #d6dbe0}.bb-notifications-item.success .notification-icon-wrapper{color:#2dc05d;background-color:#ebfaf0}.bb-notifications-item.success .notification-progress-circle{stroke:#36d068}.bb-notifications-item.error .notification-icon-wrapper{color:#f43e3e;background-color:#feeeee}.bb-notifications-item.error .notification-progress-circle{stroke:#f55656}.bb-notifications-item.warning .notification-icon-wrapper{color:#f1ae00;background-color:#fff8e7}.bb-notifications-item.warning .notification-progress-circle{stroke:#ffbc0b}.bb-notifications-item.info .notification-icon-wrapper{color:#099bf6;background-color:#e9f6fe}.bb-notifications-item.info .notification-progress-circle{stroke:#22a5f7}.bb-notifications-item.custom .notification-icon-wrapper{color:#657385;background-color:#f3f5f6}.bb-notifications-item.custom .notification-progress-circle{stroke:#657385}.notification-content-wrapper{padding:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.notification-icon-wrapper{width:40px;height:40px;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border-radius:50%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#657385;background-color:#f3f5f6}.notification-icon{width:100%;height:100%;padding:10px;fill:currentColor}.notification-content{-ms-flex:1;flex:1;font-size:14px;line-height:1.5;font-weight:500;margin-left:20px;color:rgba(0,0,0,.85)}.notification-content i{font-style:italic}.notification-actions-button,.notification-content{font-family:inherit}.notification-actions{display:-ms-flexbox;display:flex;margin:0 20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-top:1px solid #f3f5f6}.notification-actions-button{-ms-flex:1;flex:1;border:none;color:#22a5f7;cursor:pointer;font-size:14px;font-weight:500;padding:12px 2px;text-align:center;background-color:transparent}.notification-actions-button:focus>.notification-actions-button-highlight,.notification-actions-button:hover>.notification-actions-button-highlight{background-color:rgba(34,165,247,.1)}.notification-actions-button:active>.notification-actions-button-highlight{background-color:rgba(34,165,247,.2)}.notification-actions-button.destructive{color:#f55656}.notification-actions-button.destructive:focus>.notification-actions-button-highlight,.notification-actions-button.destructive:hover>.notification-actions-button-highlight{background-color:rgba(245,86,86,.1)}.notification-actions-button.destructive:active>.notification-actions-button-highlight{background-color:rgba(245,86,86,.2)}.notification-actions-button-highlight{padding:4px 12px;border-radius:12px;display:-ms-inline-flexbox;display:inline-flex;transition:background-color 150ms cubic-bezier(0,0,.2,1)}.notification-progress-ring{top:0;left:0;right:0;bottom:0;width:100%;height:100%;position:absolute}.notification-progress-circle{-ms-transform:rotate(-90deg);transform:rotate(-90deg);-ms-transform-origin:50% 50%;transform-origin:50% 50%;stroke:#657385}"]
            }] }
];
/** @nocollapse */
BbNotificationsItem.ctorParameters = () => [
    { type: NgZone },
    { type: Platform },
    { type: ChangeDetectorRef }
];
BbNotificationsItem.propDecorators = {
    notification: [{ type: Input }],
    dismissButtonText: [{ type: Input }],
    progressElementRef: [{ type: ViewChild, args: ['progress', { static: false },] }],
    getClass: [{ type: HostBinding, args: ['class',] }]
};
if (false) {
    /** @type {?} */
    BbNotificationsItem.prototype.notification;
    /** @type {?} */
    BbNotificationsItem.prototype.dismissButtonText;
    /** @type {?} */
    BbNotificationsItem.prototype.progressElementRef;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._progress;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._count;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._steps;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._speed;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._timer;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._startTime;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._difference;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._radius;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._circumference;
    /** @type {?} */
    BbNotificationsItem.prototype.callActionAndDestroy;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype.instance;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype.setTimeout;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._zone;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._platform;
    /**
     * @type {?}
     * @private
     */
    BbNotificationsItem.prototype._changeDetection;
}

/**
 * @fileoverview added by tsickle
 * Generated from: lib/notifications.module.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class NotificationsModule {
    /**
     * @param {?=} config
     * @return {?}
     */
    static forRoot(config) {
        return {
            ngModule: NotificationsModule,
            providers: [
                { provide: NotificationsConfig, useValue: config },
                Notifications
            ]
        };
    }
}
NotificationsModule.decorators = [
    { type: NgModule, args: [{
                imports: [CommonModule, LocalizeModule],
                declarations: [BbNotificationsList, BbNotificationsItem],
                entryComponents: [BbNotificationsList]
            },] }
];

/**
 * @fileoverview added by tsickle
 * Generated from: public_api.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * Generated from: bravobit-bb-foundation-notifications.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

export { NotificationType, Notifications, NotificationsConfig, NotificationsData, NotificationsModule, NotificationsPosition, BbNotificationsList as ɵa, notificationAnimation as ɵb, BbNotificationsItem as ɵc };
//# sourceMappingURL=bravobit-bb-foundation-notifications.js.map
