'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-a7b0c73d.js');
const core = require('@sankhyalabs/core');
const index$1 = require('./index-1be40f19.js');

const ezSpinnerCss = ":host{--ez-spinner--color:var(--color--ocean-green-600, #008561);--ez-spinner--size-default:24px;--ez-spinner--size-medium:32px;--ez-spinner--size-large:42px;--ez-spinner--animation-duration:1.4s;display:inline-flex;align-items:center;justify-content:center}.spinner__container{display:inline-flex;align-items:center;justify-content:center}.spinner__svg{color:var(--ez-spinner--color);width:var(--ez-spinner--size-default);height:var(--ez-spinner--size-default)}.spinner__container[data-size=\"medium\"] .spinner__svg{width:var(--ez-spinner--size-medium);height:var(--ez-spinner--size-medium)}.spinner__container[data-size=\"large\"] .spinner__svg{width:var(--ez-spinner--size-large);height:var(--ez-spinner--size-large)}.spinner__path{animation:spinner-dash var(--ez-spinner--animation-duration) ease-in-out infinite,\n    spinner-rotate var(--ez-spinner--animation-duration) linear infinite;transform-origin:center;will-change:stroke-dasharray, stroke-dashoffset}@keyframes spinner-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes spinner-dash{0%{stroke-dasharray:1, 63;stroke-dashoffset:0}50%{stroke-dasharray:32, 63;stroke-dashoffset:-16}100%{stroke-dasharray:1, 63;stroke-dashoffset:-63}}";

const EzSpinner = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.size = 'small';
  }
  addInfoId() {
    if (this._element) {
      core.ElementIDUtils.addIDInfo(this._element);
    }
  }
  async componentWillLoad() {
    this.i18n = index$1.getI18n();
  }
  componentDidLoad() {
    this.addInfoId();
  }
  render() {
    return (index.h(index.Host, null, index.h("div", { class: "spinner__container", "data-size": this.size, role: "status", "aria-label": this.i18n ? this.i18n('spinner.loading') : 'Carregando...' }, index.h("svg", { viewBox: "0 0 24 24", class: "spinner__svg" }, index.h("circle", { cx: "12", cy: "12", r: "10", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", class: "spinner__path" })))));
  }
  get _element() { return index.getElement(this); }
};
EzSpinner.style = ezSpinnerCss;

exports.ez_spinner = EzSpinner;
