'use strict';

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

var __chunk_1 = require('./chunk-cc325129.js');
var __chunk_2 = require('./chunk-d8f887e2.js');
var __chunk_3 = require('./chunk-39b0a5eb.js');
var __chunk_4 = require('./chunk-db6c6598.js');

var script = {
  name: 'VButton',
  props: {
    skin: {
      type: String,
      default: 'primary',
      validator: function validator(value) {
        return ['primary', 'secondary', 'tertiary', 'quaternary', 'ghost', 'social', 'success', 'error', 'quaternary-error'].indexOf(value) !== -1;
      }
    },
    isLoading: {
      type: Boolean,
      default: false
    },
    size: {
      type: String,
      default: 'normal',
      validator: function validator(value) {
        return ['normal', 'big'].indexOf(value) !== -1;
      }
    }
  },
  computed: {
    vButtonCssClass: function vButtonCssClass() {
      var _Object$assign;

      return Object.assign({}, this.themeCssClass, (_Object$assign = {}, __chunk_2._defineProperty(_Object$assign, "skin-".concat(this.skin), true), __chunk_2._defineProperty(_Object$assign, "size-".concat(this.size), true), _Object$assign));
    },
    isSocialIcon: function isSocialIcon() {
      return this.skin === 'social' && (this.$slots.iconBefore || this.$slots.iconAfter);
    }
  },
  mixins: [__chunk_2.ThemeMixin],
  components: {
    IconAtom: __chunk_3.IconAtom,
    SvgAtom: __chunk_4.SvgAtom
  }
};

/* script */
const __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('button',_vm._g({staticClass:"v-button",class:_vm.vButtonCssClass},_vm.$listeners),[(_vm.$slots.iconBefore && _vm.isSocialIcon && _vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon icon-before v-button-icon-loader"},[_c('svg-atom',{attrs:{"name":"loader"}})],1):_vm._e(),_vm._v(" "),(_vm.$slots.iconBefore && !_vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon icon-before"},[_vm._t("iconBefore")],2):_vm._e(),_vm._v(" "),(!_vm.isLoading || _vm.isSocialIcon)?_c('span',{staticClass:"v-button-label"},[_vm._t("default")],2):_vm._e(),_vm._v(" "),(!_vm.isSocialIcon && _vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon v-button-icon-loader"},[_c('svg-atom',{attrs:{"name":"loader"}})],1):_vm._e(),_vm._v(" "),(_vm.$slots.iconAfter && _vm.isSocialIcon && _vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon icon-after v-button-icon-loader"},[_c('svg-atom',{attrs:{"name":"loader"}})],1):_vm._e(),_vm._v(" "),(_vm.$slots.iconAfter && !_vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon icon-after"},[_vm._t("iconAfter")],2):_vm._e()],1)};
var __vue_staticRenderFns__ = [];

  /* style */
  const __vue_inject_styles__ = undefined;
  /* scoped */
  const __vue_scope_id__ = undefined;
  /* module identifier */
  const __vue_module_identifier__ = undefined;
  /* functional template */
  const __vue_is_functional_template__ = false;
  /* style inject */
  
  /* style inject SSR */
  

  
  var VButton = __chunk_1.__vue_normalize__(
    { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
    __vue_inject_styles__,
    __vue_script__,
    __vue_scope_id__,
    __vue_is_functional_template__,
    __vue_module_identifier__,
    undefined,
    undefined
  );

exports.default = VButton;
