import { h, Host } from "@stencil/core";
import { LoaderSpinnerSize } from "./loader-spinner-size.enum";
/**
 * @enums LoaderSpinnerSize - loader-spinner-size.enum.ts
 *
 * @swedishName Spinner
 */
export class LoaderSpinner {
    constructor() {
        this.afSize = LoaderSpinnerSize.MEDIUM;
        this.afText = undefined;
    }
    get cssModifiers() {
        return {
            'digi-loader-spinner--small': this.afSize == 'small',
            'digi-loader-spinner--medium': this.afSize == 'medium',
            'digi-loader-spinner--large': this.afSize == 'large'
        };
    }
    render() {
        return (h(Host, { key: 'a006926990f9225d534e62c6478be173be6f5d3a' }, h("div", { key: '888ca4a5ffa7a0c3c7d1f0af085734339f1d5111', "aria-label": this.afText, "aria-live": "assertive", class: Object.assign({ 'digi-loader-spinner': true }, this.cssModifiers) }, h("div", { key: 'f43445f601961f158b2912f6a55592e69b801969', class: "digi-loader-spinner__container", "aria-hidden": "true" }, h("digi-icon-spinner", { key: '8a86ff4ab1818af92541bf3a682e0bd272e46000', class: "digi-loader-spinner__spinner" })), this.afText && (h("div", { key: 'f77a967241945cef8f4a832698ce1c45a07c56af', class: "digi-loader-spinner__label" }, this.afText)))));
    }
    static get is() { return "digi-loader-spinner"; }
    static get encapsulation() { return "scoped"; }
    static get originalStyleUrls() {
        return {
            "$": ["loader-spinner.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["loader-spinner.css"]
        };
    }
    static get properties() {
        return {
            "afSize": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "LoaderSpinnerSize",
                    "resolved": "LoaderSpinnerSize.LARGE | LoaderSpinnerSize.MEDIUM | LoaderSpinnerSize.SMALL",
                    "references": {
                        "LoaderSpinnerSize": {
                            "location": "import",
                            "path": "./loader-spinner-size.enum",
                            "id": "src/components/_loader/loader-spinner/loader-spinner-size.enum.ts::LoaderSpinnerSize"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set spinner icon size. Defaults to medium size."
                        }],
                    "text": "S\u00E4tter spinnerns storlek. 'medium' \u00E4r f\u00F6rvalt."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-size",
                "reflect": false,
                "defaultValue": "LoaderSpinnerSize.MEDIUM"
            },
            "afText": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "string",
                    "resolved": "string",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "en",
                            "text": "Set spinners text."
                        }],
                    "text": "S\u00E4tter spinnerns text."
                },
                "getter": false,
                "setter": false,
                "attribute": "af-text",
                "reflect": false
            }
        };
    }
    static get elementRef() { return "hostElement"; }
}
