import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import "../../../src/scss/spinner.scss";
import Vue from 'vue';
export default Vue.extend({
  name: 'w-spinner',
  props: {
    type: {
      type: String,
      default: 'default'
    },
    size: {
      type: Number,
      default: 17
    },
    color: {
      type: String,
      default: '#aaa'
    }
  },
  computed: {
    fontclass: function fontclass() {
      switch (this.type) {
        case 'snake':
          return 'icon-spinner-1';

        case 'double-snake':
          return 'icon-spinner9';

        case 'bar-circle':
          return 'icon-spinner2';

        case 'dot-circle':
          return 'icon-spinner1';

        default:
          return '';
      }
    },
    style: function style() {
      return {
        fontSize: this.size + 'px',
        color: this.color
      };
    }
  },
  render: function render() {
    var h = arguments[0];

    if (this.type === 'default') {
      return h("i", {
        "class": "weui-loading",
        "style": this.style
      });
    } else {
      return h("span", {
        "class": "wv-spinner"
      }, [h("i", {
        "class": _defineProperty({
          'iconfont': true
        }, this.fontclass, true),
        "style": this.style
      })]);
    }
  }
});
//# sourceMappingURL=WSpinner.js.map