import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/progress-spinner";
const defaultDiameter = 60;
const defaultStrokeWidth = 5;
/**
 * Component to display spinner
 */
export class SpinnerComponent {
    constructor() {
        /**
         * Stroke with (default: 5px)
         */
        this.strokeWidth = defaultStrokeWidth;
        /**
         * Diameter (default: 60px)
         */
        this.diameter = defaultDiameter;
        /**
         * Progress spinner mode
         * Input must be one of these values: determinate, indeterminate, buffer, query, defaults to 'determinate'.
         */
        this.mode = 'indeterminate';
        /**
         * Show percentage (default value true)
         */
        this.showPercentage = true;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SpinnerComponent, selector: "mic-spinner", inputs: { color: "color", strokeWidth: "strokeWidth", diameter: "diameter", mode: "mode", value: "value", ariaLabel: "ariaLabel", showPercentage: "showPercentage" }, ngImport: i0, template: "<div class=\"grid items-center\">\n  <mat-progress-spinner\n    class=\"first-grid\"\n    [mode]=\"mode\"\n    [color]=\"color\"\n    [strokeWidth]=\"strokeWidth\"\n    [diameter]=\"diameter\"\n    [value]=\"value\"\n    [ariaLabel]=\"ariaLabel\"\n  ></mat-progress-spinner>\n  @if (mode !== 'indeterminate' && showPercentage) {\n  <h6 class=\"percentage\" [ngClass]=\"diameter >= 60 ? 'first-grid' : ''\">\n    {{ value + '%' }}\n  </h6>\n  }\n</div>\n", styles: [":host{height:100%;min-height:100%;min-width:100%;width:100%;flex-direction:row;box-sizing:border-box;display:flex;place-content:center;align-items:center;padding:10px 0}.percentage{margin-top:0;text-align:center}.first-grid{grid-row:1;grid-column:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SpinnerComponent, decorators: [{
            type: Component,
            args: [{ selector: 'mic-spinner', template: "<div class=\"grid items-center\">\n  <mat-progress-spinner\n    class=\"first-grid\"\n    [mode]=\"mode\"\n    [color]=\"color\"\n    [strokeWidth]=\"strokeWidth\"\n    [diameter]=\"diameter\"\n    [value]=\"value\"\n    [ariaLabel]=\"ariaLabel\"\n  ></mat-progress-spinner>\n  @if (mode !== 'indeterminate' && showPercentage) {\n  <h6 class=\"percentage\" [ngClass]=\"diameter >= 60 ? 'first-grid' : ''\">\n    {{ value + '%' }}\n  </h6>\n  }\n</div>\n", styles: [":host{height:100%;min-height:100%;min-width:100%;width:100%;flex-direction:row;box-sizing:border-box;display:flex;place-content:center;align-items:center;padding:10px 0}.percentage{margin-top:0;text-align:center}.first-grid{grid-row:1;grid-column:1}\n"] }]
        }], propDecorators: { color: [{
                type: Input
            }], strokeWidth: [{
                type: Input
            }], diameter: [{
                type: Input
            }], mode: [{
                type: Input
            }], value: [{
                type: Input
            }], ariaLabel: [{
                type: Input
            }], showPercentage: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bpbm5lci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy90aGVtZS9zcmMvbGliL2xvYWRlci9zcGlubmVyL3NwaW5uZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvdGhlbWUvc3JjL2xpYi9sb2FkZXIvc3Bpbm5lci9zcGlubmVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBL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