'use strict';

var normalizeComponent = require('./normalize-component-6fa50395.js');
var ThemeMixin = require('./ThemeMixin-a2f817cd.js');

var script = {
  name: 'InputAtom',
  inheritAttrs: false,
  props: {
    skin: {
      type: String,
      default: 'primary',
      validator: function validator(value) {
        return ['primary', 'secondary'].indexOf(value) !== -1;
      }
    },
    value: {
      type: [String, Number],
      default: null
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    listeners: function listeners() {
      var _this = this;

      return ThemeMixin._objectSpread2(ThemeMixin._objectSpread2({}, this.$listeners), {}, {
        input: function input(e) {
          _this.$emit('input', e.target.value);
        }
      });
    },
    inputAtomCssClass: function inputAtomCssClass() {
      var _Object$assign;

      return Object.assign(this.themeCssClass, (_Object$assign = {}, ThemeMixin._defineProperty(_Object$assign, this.skin, !!this.skin), ThemeMixin._defineProperty(_Object$assign, 'is-error', this.$attrs['is-error']), _Object$assign));
    }
  },
  mixins: [ThemeMixin.ThemeMixin]
};

/* 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:"input-atom",class:_vm.inputAtomCssClass,attrs:{"disabled":_vm.disabled}},[_c('input',_vm._g(_vm._b({staticClass:"input-atom-control",attrs:{"disabled":_vm.disabled},domProps:{"value":_vm.value}},'input',_vm.$attrs,false),_vm.listeners)),_vm._v(" "),_vm._t("default")],2)};
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 InputAtom = 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
  );

exports.InputAtom = InputAtom;
