'use strict';

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

var normalizeComponent = require('./normalize-component-6fa50395.js');
var ThemeMixin = require('./ThemeMixin-a2f817cd.js');
var svgAtom = require('./svg-atom-d2541b7d.js');
var iconAtom = require('./icon-atom-65241b51.js');

//
var script = {
  name: 'ButtonLoaderMolecule',
  mixins: [ThemeMixin.ThemeMixin],
  components: {
    SvgAtom: svgAtom.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('span',{staticClass:"button-loader-molecule",class:_vm.themeCssClass},[_c('svg-atom',{attrs:{"name":"empty"}}),_vm._v(" "),_c('span',{staticClass:"button-loader-molecule-spinner"},[_c('svg-atom',{attrs:{"name":"loader"}})],1)],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 ButtonLoaderAtom = normalizeComponent.__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
  );

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

      return ThemeMixin._objectSpread2(ThemeMixin._objectSpread2({}, this.themeCssClass), {}, (_objectSpread2 = {}, ThemeMixin._defineProperty(_objectSpread2, "skin-".concat(this.skin), true), ThemeMixin._defineProperty(_objectSpread2, "size-".concat(this.size), true), ThemeMixin._defineProperty(_objectSpread2, 'is-inline', this.isInline), _objectSpread2));
    },
    isSocialIcon: function isSocialIcon() {
      return this.skin === 'social' && (this.$slots.iconBefore || this.$slots.iconAfter);
    }
  },
  mixins: [ThemeMixin.ThemeMixin],
  components: {
    ButtonLoaderAtom: ButtonLoaderAtom,
    IconAtom: iconAtom.IconAtom
  }
};

/* script */
const __vue_script__$1 = script$1;

/* template */
var __vue_render__$1 = 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"},[_c('button-loader-atom')],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"},[_c('button-loader-atom')],1):_vm._e(),_vm._v(" "),(_vm.$slots.iconAfter && _vm.isSocialIcon && _vm.isLoading)?_c('icon-atom',{staticClass:"v-button-icon icon-after"},[_c('button-loader-atom')],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__$1 = [];

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

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

exports.default = VButton;
