import { h } from '@stencil/core';
export class EclSpinner {
  constructor() {
    this.styleClass = '';
    this.variant = 'primary';
    this.theme = 'ec';
    this.centered = false;
    this.visible = false;
    this.overlay = false;
    this.size = 'medium';
  }
  getClass() {
    const classes = [
      `ecl-spinner`,
      `ecl-spinner--${this.variant}`,
      `ecl-spinner--${this.size}`,
      this.styleClass
    ];
    if (this.centered) {
      classes.push('ecl-spinner--centered');
    }
    if (this.visible) {
      classes.push('ecl-spinner--visible');
    }
    return classes.join(' ');
  }
  getOverlayClass() {
    const overlayClasses = ['ecl-spinner__overlay'];
    if (this.visible) {
      overlayClasses.push('ecl-spinner__overlay--visible');
    }
    return overlayClasses.join(' ');
  }
  render() {
    return (h("div", null, h("div", { class: this.getClass() }, h("svg", { class: "ecl-spinner__loader", viewBox: "25 25 50 50" }, h("circle", { class: "ecl-spinner__circle", cx: "50", cy: "50", r: "20", fill: "none", "stroke-width": "4px", "stroke-miterlimit": "10", "vector-effect": "non-scaling-stroke" })), h("div", { class: "ecl-spinner__text" }, h("slot", null))), this.overlay ?
      h("div", { class: this.getOverlayClass() }) : ''));
  }
  static get is() { return "ecl-spinner"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() {
    return {
      "ec": ["./build/styles/ecl-spinner-ec.css"],
      "eu": ["./build/styles/ecl-spinner-eu.css"]
    };
  }
  static get styleUrls() {
    return {
      "ec": ["./build/styles/ecl-spinner-ec.css"],
      "eu": ["./build/styles/ecl-spinner-eu.css"]
    };
  }
  static get properties() {
    return {
      "styleClass": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "style-class",
        "reflect": false,
        "defaultValue": "''"
      },
      "variant": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "variant",
        "reflect": false,
        "defaultValue": "'primary'"
      },
      "theme": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "theme",
        "reflect": false,
        "defaultValue": "'ec'"
      },
      "centered": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "centered",
        "reflect": false,
        "defaultValue": "false"
      },
      "visible": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "visible",
        "reflect": false,
        "defaultValue": "false"
      },
      "overlay": {
        "type": "boolean",
        "mutable": false,
        "complexType": {
          "original": "boolean",
          "resolved": "boolean",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "overlay",
        "reflect": false,
        "defaultValue": "false"
      },
      "size": {
        "type": "string",
        "mutable": false,
        "complexType": {
          "original": "string",
          "resolved": "string",
          "references": {}
        },
        "required": false,
        "optional": false,
        "docs": {
          "tags": [],
          "text": ""
        },
        "attribute": "size",
        "reflect": false,
        "defaultValue": "'medium'"
      }
    };
  }
}
//# sourceMappingURL=ecl-spinner.js.map
