/*! bxs-vue-ui v3.3.0 */
'use strict';

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

require('../utils/entry-virtual.js');
var normalizeComponent = require('../utils/normalize-component.js');
require('../utils/sloppy-array-method.js');
var indexOf = require('../utils/index-of.js');
var env = require('../utils/env.js');

var typeList = ['default', 'primary', 'success', 'info', 'warning', 'danger', 'caution'];

var onlyValues = function onlyValues(values) {
  return function (str) {
    return indexOf._indexOfInstanceProperty(values).call(values, str) !== -1;
  };
};

var script = normalizeComponent.create({
  name: 'tag',
  props: {
    plain: {
      type: Boolean,
      default: false
    },
    loose: {
      type: Boolean,
      default: false
    },
    type: {
      type: String,
      default: 'default',
      validator: onlyValues(typeList)
    }
  },
  computed: {
    tagClass: function tagClass() {
      var obj = {
        'bx-tag--android': env.Env.isAndroid,
        'bx-tag': true,
        'bx-tag--plain': this.plain,
        'bx-hairline--surround': this.plain,
        'bx-tag--loose': this.loose,
        'bx-tag-type--default': false
      };

      if (this.type && this.type !== 'default') {
        obj["bx-tag-type--" + this.type] = true;
      } else {
        obj["bx-tag-type--default"] = true;
      }

      return obj;
    }
  }
});

/* script */
var __vue_script__ = script;
/* template */

var __vue_render__ = function __vue_render__() {
  var _vm = this;

  var _h = _vm.$createElement;

  var _c = _vm._self._c || _h;

  return _c('span', {
    class: _vm.tagClass
  }, [_vm._t("default")], 2);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

var __vue_scope_id__ = undefined;
/* module identifier */

var __vue_module_identifier__ = undefined;
/* functional template */

var __vue_is_functional_template__ = false;
/* style inject */

/* style inject SSR */

var index = 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 = index;
