import Vue from 'vue';
import "../../../src/scss/button.scss";
export default Vue.extend({
  name: 'w-button',
  props: {
    type: {
      type: String,
      default: 'default'
    },
    isLoading: Boolean,
    disabled: Boolean,
    mini: Boolean,
    plain: Boolean
  },
  computed: {
    classes: function classes() {
      var ret = {
        'weui-btn': true,
        'weui-btn_loading': this.isLoading,
        'weui-btn_mini': this.mini
      };
      var classType = this.plain ? "weui-btn_plain-".concat(this.type) : "weui-btn_".concat(this.type);
      var classDisabled = this.plain ? 'weui-btn_plain-disabled' : 'weui-btn_disabled';
      ret[classType] = true;
      ret[classDisabled] = this.disabled;
      return ret;
    }
  },
  methods: {
    onClick: function onClick(event) {
      this.$emit('click', event);
    }
  },
  render: function render() {
    var _this = this;

    var h = arguments[0];
    return h("button", {
      "class": this.classes,
      "on": {
        "click": function click(e) {
          _this.onClick(e);
        }
      },
      "attrs": {
        "disabled": this.disabled
      }
    }, [this.isLoading && h("i", {
      "class": "weui-loading"
    }), this.$slots.default]);
  }
});
//# sourceMappingURL=WButton.js.map