/**
 * @fileoverview added by tsickle
 * Generated from: common/loading/loading-indicator.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { Component, Input } from '@angular/core';
/** @enum {string} */
var SIZES = {
    sm: "sm",
    md: "md",
    lg: "lg",
};
export { SIZES };
/**
 * Loading indicator for blocking modal dialogs while loading.
 */
var LoadingIndicatorComponent = /** @class */ (function () {
    function LoadingIndicatorComponent() {
        /**
         * Default spinner size set to "md" - medium used within the modal dialogs
         */
        this.defaultSpinnerSize = SIZES.md;
        /**
         * Spinner size.
         *
         * Spinners can be displayed in three sizes:
         *
         *  - sm(Small): This is the required sizing for inline spinners (see above). It measures 18x18 pixels.
         *  - md(Medium): Medium spinners measure 36x36 pixels. Default.
         *  - lg(Large): This is the default size for page spinners (see above).
         *
         */
        this._size = this.defaultSpinnerSize;
        /**
         * Show/hide the spinner if only an overlay is required.
         */
        this.showSpinner = true;
        /**
         * Text to show next to the spinner.
         */
        this.loadingTextKey = null;
    }
    Object.defineProperty(LoadingIndicatorComponent.prototype, "size", {
        /**
         * Gives the size of this loading indicator.
         */
        get: /**
         * Gives the size of this loading indicator.
         * @return {?}
         */
        function () {
            return this._size;
        },
        /**
         * Spinner size setter.
         * Sets default size if provided value is not from specified sized.
         */
        set: /**
         * Spinner size setter.
         * Sets default size if provided value is not from specified sized.
         * @param {?} size
         * @return {?}
         */
        function (size) {
            if (!size || Object.keys(SIZES).indexOf(size) === -1) {
                this._size = this.defaultSpinnerSize;
            }
            else {
                this._size = size;
            }
        },
        enumerable: true,
        configurable: true
    });
    LoadingIndicatorComponent.decorators = [
        { type: Component, args: [{
                    selector: 'vcd-loading-indicator',
                    template: "<ng-container *ngIf=\"isLoading\">\n    <div class=\"overlay\"></div>\n    <div *ngIf=\"showSpinner\" class=\"indicator-container\">\n        <div>\n            <span [ngClass]=\"['spinner', loadingTextKey ? 'spinner-inline' : 'spinner-' + size]\"> </span>\n            <span class=\"qa-loading-text\" *ngIf=\"loadingTextKey\">{{ loadingTextKey | translate }}</span>\n        </div>\n    </div>\n</ng-container>\n<ng-content></ng-content>\n",
                    styles: [":host{display:block;position:relative}:host-context(.modal-body) .overlay{background-color:rgba(255,255,255,.5)}.overlay{background-color:rgba(250,250,250,.5);position:absolute;top:0;left:0;right:0;bottom:0;z-index:10}.indicator-container{z-index:600;display:flex;flex-direction:row;justify-content:center;align-items:center;position:absolute;top:0;left:0;right:0;bottom:0}"]
                }] }
    ];
    LoadingIndicatorComponent.propDecorators = {
        isLoading: [{ type: Input }],
        showSpinner: [{ type: Input }],
        loadingTextKey: [{ type: Input }],
        size: [{ type: Input }]
    };
    return LoadingIndicatorComponent;
}());
export { LoadingIndicatorComponent };
if (false) {
    /**
     * Default spinner size set to "md" - medium used within the modal dialogs
     * @type {?}
     * @private
     */
    LoadingIndicatorComponent.prototype.defaultSpinnerSize;
    /**
     * Spinner size.
     *
     * Spinners can be displayed in three sizes:
     *
     *  - sm(Small): This is the required sizing for inline spinners (see above). It measures 18x18 pixels.
     *  - md(Medium): Medium spinners measure 36x36 pixels. Default.
     *  - lg(Large): This is the default size for page spinners (see above).
     *
     * @type {?}
     * @private
     */
    LoadingIndicatorComponent.prototype._size;
    /**
     * Show/hide the loading indicator.
     * @type {?}
     */
    LoadingIndicatorComponent.prototype.isLoading;
    /**
     * Show/hide the spinner if only an overlay is required.
     * @type {?}
     */
    LoadingIndicatorComponent.prototype.showSpinner;
    /**
     * Text to show next to the spinner.
     * @type {?}
     */
    LoadingIndicatorComponent.prototype.loadingTextKey;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9hZGluZy1pbmRpY2F0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQHZjZC91aS1jb21wb25lbnRzLyIsInNvdXJjZXMiOlsiY29tbW9uL2xv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