'use strict';

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

var normalizeComponent = require('./normalize-component-6fa50395.js');
require('./ThemeMixin-a2f817cd.js');
var svgAtom = require('./svg-atom-d2541b7d.js');
var iconAtom = require('./icon-atom-65241b51.js');
require('./hover-atom-17a12a07.js');
require('./tooltip-atom-8f536df5.js');
var fieldAtom = require('./field-atom-fe4b7c7b.js');
var inputAtom = require('./input-atom-9431266a.js');
var errorAtom = require('./error-atom-2f5dc7b9.js');
var labelMolecule = require('./label-molecule-9793dd9f.js');
var descriptionAtom = require('./description-atom-34b2b8a7.js');

//
var script = {
  name: 'VInput',
  inheritAttrs: false,
  props: {
    label: {
      type: String,
      default: ''
    },
    tooltipLabel: {
      type: String,
      default: ''
    },
    value: {
      type: [String, Number],
      default: null
    },
    error: {
      type: String,
      default: ''
    },
    description: {
      type: String,
      default: ''
    },
    disabled: {
      type: Boolean,
      default: false
    },
    skin: {
      type: String,
      default: 'primary',
      validator: function validator(value) {
        return ['primary', 'secondary'].indexOf(value) !== -1;
      }
    }
  },
  computed: {
    isError: function isError() {
      return !!this.error;
    }
  },
  components: {
    LabelMolecule: labelMolecule.LabelMolecule,
    InputAtom: inputAtom.InputAtom,
    FieldAtom: fieldAtom.FieldAtom,
    ErrorAtom: errorAtom.ErrorAtom,
    DescriptionAtom: descriptionAtom.DescriptionAtom,
    IconAtom: iconAtom.IconAtom,
    SvgAtom: svgAtom.SvgAtom
  },
  model: {
    event: 'input',
    prop: 'value'
  }
};

/* 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('field-atom',[(_vm.label)?_c('label-molecule',{attrs:{"label":_vm.label,"disabled":_vm.disabled,"tooltip-label":_vm.tooltipLabel}}):_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,"disabled":_vm.disabled,"skin":_vm.skin}},'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__ = [];

  /* 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 VInput = 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.default = VInput;
