import { Host, h } from "@stencil/core";
export class CpslSpinner {
    constructor() {
        this.variant = 'default';
        this.size = 54;
        this.barWidth = undefined;
        this.speed = 1;
    }
    render() {
        return (h(Host, { key: '218db1b832fb9968ce57b0ed96b19adfa746689d', style: {
                ['--height']: `${this.size}px`,
                ['--width']: `${this.size}px`,
                ['--bar-width']: `${this.barWidth ? this.barWidth : this.size * 0.12}px`,
            } }, h("div", { key: 'ac9f128fee0043c786334cd8dfeaa4753fad8736', class: { loader: true, [this.variant]: true } })));
    }
    static get is() { return "cpsl-spinner"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-spinner.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-spinner.css"]
        };
    }
    static get properties() {
        return {
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'default' | 'inactive' | 'error'",
                    "resolved": "\"default\" | \"error\" | \"inactive\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Variant of the spinner\nDefault is 'default'."
                },
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "'default'"
            },
            "size": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Size of the spinner in pixels.\nDefault is 50."
                },
                "attribute": "size",
                "reflect": false,
                "defaultValue": "54"
            },
            "barWidth": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Width of the spinner arc in pixels.\nDefault is 6.5."
                },
                "attribute": "bar-width",
                "reflect": false
            },
            "speed": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "Rotation speed of the spinner in seconds.\nDefault is 1."
                },
                "attribute": "speed",
                "reflect": false,
                "defaultValue": "1"
            }
        };
    }
}
//# sourceMappingURL=cpsl-spinner.js.map
