/*! bxs-vue-ui v3.3.0 */
import '../utils/entry-virtual.js';
import { C as create, _ as __vue_normalize__ } from '../utils/normalize-component.js';
import '../utils/object-create.js';
import '../utils/html.js';
import '../utils/es.number.constructor.js';
import '../utils/array-iteration.js';
import '../utils/sloppy-array-method.js';
import { _ as _indexOfInstanceProperty } from '../utils/index-of.js';
import '../utils/string-trim.js';
import { _ as _filterInstanceProperty } from '../utils/filter.js';
import { _ as _someInstanceProperty } from '../utils/some.js';
import { _ as _trimInstanceProperty } from '../utils/trim.js';

var script = create({
  name: 'steps',
  created: function created() {
    if (this.stepCount) {
      var _context;

      if (_someInstanceProperty(_context = this.$slots.default).call(_context, function (step) {
        var _context2;

        return !(step.componentOptions === undefined && step.text && _trimInstanceProperty(_context2 = step.text).call(_context2) === '' || step.componentOptions && step.componentOptions.tag === 'bxs-step');
      })) {
        throw new Error("<bxs-steps>\u7684slot\u5143\u7D20\u53EA\u80FD\u4E3A<bxs-step>");
      }

      if (this.active > this.stepCount) {
        throw new Error("\u6B65\u9AA4\u503C\u4E0D\u80FD\u5927\u4E8E\u6B65\u9AA4\u6700\u5927\u503C: " + this.stepCount);
      }
    } else {
      throw new Error("\u7EC4\u4EF6\u6B65\u9AA4\u4E0D\u80FD\u4E3A\u7A7A");
    }
  },
  props: {
    type: {
      // 步骤类型
      type: String,
      default: 'horizontal',
      validator: function validator(value) {
        var _context3;

        // 值必须是这些字符串中的一个
        return _indexOfInstanceProperty(_context3 = ['horizontal', 'tail']).call(_context3, value) !== -1;
      }
    },
    active: {
      // 当前步骤
      type: Number,
      default: 0
    },
    activeColor: {
      // 激活状态颜色
      type: String,
      default: '#508CEE'
    },
    activeBgColor: {
      // tail类型。背景色
      type: String,
      default: '#F2F7FF'
    }
  },
  computed: {
    stepCount: function stepCount() {
      var _context4;

      return this.$slots.default && _filterInstanceProperty(_context4 = this.$slots.default).call(_context4, function (step) {
        return step.componentOptions && step.componentOptions.tag === 'bxs-step';
      }).length;
    }
  }
});

/* 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('div', {
    staticClass: "bx-steps-wrapper"
  }, [_c('div', {
    class: "bx-steps-group bx-steps-group--" + _vm.type
  }, [_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 = __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);

export default index;
