'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 __chunk_6 = require('./chunk-d26f109e.js');
var __chunk_7 = require('./chunk-29761f59.js');
var __chunk_8 = require('./chunk-62364dff.js');
var __chunk_9 = require('./chunk-92c37f3d.js');

var script = {
  name: 'InputAtom',
  inheritAttrs: false,
  props: {
    value: {
      type: [String, Number],
      default: null
    }
  },
  computed: {
    listeners: function listeners() {
      var _this = this;

      return Object.assign({}, __chunk_2._objectSpread2({}, this.$listeners, {
        input: function input(e) {
          _this.$emit('input', e.target.value);
        }
      }));
    },
    inputAtomCssClass: function inputAtomCssClass() {
      return Object.assign(this.themeCssClass, {
        'is-error': this.$attrs['is-error']
      });
    }
  },
  mixins: [__chunk_2.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.$attrs.disabled}},[_c('input',_vm._g(_vm._b({staticClass:"input-atom-control",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 = __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
  );

//
var script$1 = {
  name: 'VInput',
  inheritAttrs: false,
  props: {
    label: {
      type: String,
      default: null
    },
    value: {
      type: [String, Number],
      default: null
    },
    error: {
      type: String,
      default: null
    },
    description: {
      type: String,
      default: null
    }
  },
  data: function data() {
    return {
      isFocus: false
    };
  },
  computed: {
    listeners: function listeners() {
      var _this = this;

      return Object.assign({}, this.$listeners, {
        input: function input(value) {
          _this.$emit('input', value);
        }
      });
    },
    isError: function isError() {
      return !!this.error;
    }
  },
  components: {
    InputAtom: InputAtom,
    LabelAtom: __chunk_8.LabelAtom,
    FieldAtom: __chunk_7.FieldAtom,
    ErrorAtom: __chunk_9.ErrorAtom,
    DescriptionAtom: __chunk_6.DescriptionAtom,
    IconAtom: __chunk_3.IconAtom,
    SvgAtom: __chunk_4.SvgAtom
  }
};

/* 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('field-atom',[(_vm.label)?_c('label-atom',{attrs:{"label":_vm.label}}):_vm._e(),_vm._v(" "),(_vm.description)?_c('description-atom',_vm._b({attrs:{"description":_vm.description}},'description-atom',_vm.$attrs,false)):_vm._e(),_vm._v(" "),_c('input-atom',_vm._g(_vm._b({attrs:{"value":_vm.value,"is-error":_vm.isError}},'input-atom',_vm.$attrs,false),_vm.listeners),[(_vm.isError)?_c('icon-atom',{attrs:{"is-error":_vm.isError}},[_c('svg-atom',{attrs:{"name":"error"}})],1):_vm._e()],1),_vm._v(" "),(_vm.isError)?_c('error-atom',{attrs:{"error":_vm.error}}):_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 VInput = __chunk_1.__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 = VInput;
