import { __decorate } from "tslib";
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { mixinDisabled } from '@bravobit/bb-foundation';
class BbSpinnerBase {
}
const BbSpinnerMixinBase = mixinDisabled(BbSpinnerBase);
let BbSpinner = class BbSpinner extends BbSpinnerMixinBase {
    constructor() {
        super(...arguments);
        // Inputs.
        this.color = '#303f9f';
        this.alt = 'Loading...';
    }
};
__decorate([
    Input()
], BbSpinner.prototype, "color", void 0);
__decorate([
    Input()
], BbSpinner.prototype, "alt", void 0);
BbSpinner = __decorate([
    Component({
        selector: 'bb-spinner',
        template: "<!--\n    The spinner element.\n\n    This element contains a circle with a 25% bar that spins\n    indefinitely. The border color can be set via the \"color\"\n    property.\n-->\n<div class=\"bb-spinner-container\">\n    <div [style.border-left-color]=\"color\"\n         [class.disabled]=\"disabled\"\n         class=\"bb-spinner-loader\"\n         aria-live=\"assertive\"\n         role=\"alert\">\n        {{ alt }}\n    </div>\n    <ng-content select=\"img\"></ng-content>\n</div>\n\n<!--\n    The content of the spinner.\n\n    This element contains the content of the spinner. The user\n    can set the content inside the tag.\n-->\n<span class=\"bb-spinner-content\">\n    <ng-content></ng-content>\n</span>\n",
        changeDetection: ChangeDetectionStrategy.OnPush,
        encapsulation: ViewEncapsulation.None,
        host: { 'class': 'bb-spinner' },
        inputs: ['color', 'alt', 'disabled'],
        preserveWhitespaces: false,
        styles: [".bb-spinner{color:#565656;padding:20px 0;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bb-spinner.block{display:-webkit-box;display:-ms-flexbox;display:flex}.bb-spinner.inverse .bb-spinner-loader{border-color:rgba(255,255,255,.15)}.bb-spinner.inverse .bb-spinner-content{color:rgba(255,255,255,.5)}.bb-spinner.small .bb-spinner-loader,.bb-spinner.small .bb-spinner-loader:after{width:20px;height:20px;min-width:20px;min-height:20px}.bb-spinner.small .bb-spinner-loader{border-width:2px}.bb-spinner.small .bb-spinner-content{font-size:12px}.bb-spinner.medium .bb-spinner-loader,.bb-spinner.medium .bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px}.bb-spinner.medium .bb-spinner-loader{border-width:4px}.bb-spinner.medium .bb-spinner-content{font-size:16px}.bb-spinner.large .bb-spinner-loader,.bb-spinner.large .bb-spinner-loader:after{width:100px;height:100px;min-width:100px;min-height:100px}.bb-spinner.large .bb-spinner-loader{border-width:6px}.bb-spinner.large .bb-spinner-content{font-size:20px}.bb-spinner.horizontal{text-align:left;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.bb-spinner.horizontal .bb-spinner-content:not(:empty){margin-left:10px;margin-top:0}.bb-spinner.vertical{text-align:center;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.bb-spinner.vertical .bb-spinner-content:not(:empty){margin-left:0;margin-top:10px}.bb-spinner-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}.bb-spinner-container>img{top:20%;left:20%;width:60%;height:60%;position:absolute}.bb-spinner-loader{margin:0;padding:0;overflow:hidden;text-indent:100%;color:transparent;position:relative;display:inline-block;vertical-align:middle;border:4px solid #f2f4f6;-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}.bb-spinner-loader,.bb-spinner-loader:after{width:60px;height:60px;min-width:60px;min-height:60px;border-radius:50%}.bb-spinner-loader.disabled{cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-animation-play-state:paused;animation-play-state:paused}.bb-spinner-content:not(:empty){font-size:16px;margin-top:10px;font-weight:500}@-webkit-keyframes spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"]
    })
], BbSpinner);
export { BbSpinner };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AYnJhdm9iaXQvYmItZm91bmRhdGlvbi9lbGVtZW50cy8iLCJzb3VyY2VzIjpbImxpYi9zcGlubmVyL3NwaW5uZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUMsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxpQkFBaUIsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUMzRixPQUFPLEVBQW9DLGFBQWEsRUFBQyxNQUFNLHlCQUF5QixDQUFDO0FBRXpGLE1BQU0sYUFBYTtDQUNsQjtBQUVELE1BQU0sa0JBQWtCLEdBRWxCLGFBQWEsQ0FBQyxhQUFhLENBQUMsQ0FBQztBQVluQyxJQUFhLFNBQVMsR0FBdEIsTUFBYSxTQUFVLFNBQVEsa0JBQWtCO0lBQWpEOztRQUVJLFVBQVU7UUFDRCxVQUFLLEdBQVcsU0FBUyxDQUFDO1FBQzFCLFFBQUcsR0FBVyxZQUFZLENBQUM7SUFFeEMsQ0FBQztDQUFBLENBQUE7QUFIWTtJQUFSLEtBQUssRUFBRTt3Q0FBMkI7QUFDMUI7SUFBUixLQUFLLEVBQUU7c0NBQTRCO0FBSjNCLFNBQVM7SUFWckIsU0FBUyxDQUFDO1FBQ1AsUUFBUSxFQUFFLFlBQVk7UUFDdEIsMHRCQUF1QztRQUV2QyxlQUFlLEVBQUUsdUJBQXVCLENBQUMsTUFBTTtRQUMvQyxhQUFhLEVBQUUsaUJBQWlCLENBQUMsSUFBSTtRQUNyQyxJQUFJLEVBQUUsRUFBQyxPQUFPLEVBQUUsWUFBWSxFQUFDO1FBQzdCLE1BQU0sR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