import create from '../utils/create';
export default create({
  render: function render() {
    var _vm = this;

    var _h = _vm.$createElement;

    var _c = _vm._self._c || _h;

    return _c(_vm.tag, {
      tag: "component",
      class: _vm.b([{
        loading: _vm.loading,
        block: _vm.block,
        disabled: _vm.disabled
      }, _vm.size, _vm.radius]),
      attrs: {
        "disabled": _vm.disabled
      },
      on: {
        "click": _vm.onClick
      }
    }, [_vm.loading ? [_c('icon', {
      staticClass: "vm-icon-spin",
      attrs: {
        "name": "spinner"
      }
    }), _c('span', [_vm._v(_vm._s(_vm.loadingText))])] : _vm._t("default", [_vm._v(_vm._s(_vm.text))])], 2);
  },
  name: 'button',
  props: {
    tag: {
      type: String,
      default: 'button'
    },
    radius: {
      type: String,
      default: 'nc'
    },
    size: {
      type: String,
      default: 'md'
    },
    icon: String,
    block: Boolean,
    plain: Boolean,
    loading: Boolean,
    loadingText: String,
    text: String,
    disabled: Boolean
  },
  methods: {
    onClick: function onClick(event) {
      if (!this.loading && !this.disabled) {
        this.$emit('click', event);
      }
    }
  }
});