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: 'd2ff7ec4dead0e6764978cd0833cfabc11eec31b' }, h("div", { key: '6e57f7e74bc42a4d38f33b60e8c50e37b46a6bf8', "aria-label": this.afText, "aria-live": "assertive", class: Object.assign({ 'digi-loader-spinner': true }, this.cssModifiers) }, h("div", { key: '9a5ff5d94df387af74ab280ba9fe0c7e85edf175', class: "digi-loader-spinner__container", "aria-hidden": "true" }, h("digi-icon-spinner", { key: 'a43b971d373c65b92b88c673d18dea21d7551de1', class: "digi-loader-spinner__spinner" })), this.afText && (h("div", { key: 'c9b17158034feae1a0e3b88bdd987a68060eaa94', 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"; }
}
