/*! bxs-vue-ui v3.3.0 */
import '../utils/entry-virtual.js';
import { C as create, _ as __vue_normalize__ } from '../utils/normalize-component.js';
import Icon from '../icon/index.js';
import { _ as _includesInstanceProperty } from '../utils/includes.js';

var _components;
var script = create({
  name: 'result-status',
  props: {
    title: {
      type: String,
      default: ''
    },
    type: {
      type: String,
      default: 'wait',
      validator: function validator(value) {
        var _context;

        return value === '' || _includesInstanceProperty(_context = ['wait', 'success', 'fail']).call(_context, value);
      }
    }
  },
  data: function data() {
    return {
      currentIndex: 0,
      dataArr: [{
        type: 'wait',
        icon: 'warning-solid',
        url: 'http://media.winbaoxian.com/autoUpload/activity/wait_e0decee1376db37.png'
      }, {
        type: 'success',
        icon: 'check-solid',
        url: 'http://media.winbaoxian.com/autoUpload/activity/pass_f3865e3c29e7e11.png'
      }, {
        type: 'fail',
        icon: 'close-solid bx-red-font',
        url: 'http://media.winbaoxian.com/autoUpload/activity/fail_5a9c32460ea8cbf.png'
      }]
    };
  },
  created: function created() {
    if (this.type === 'wait') {
      this.currentIndex = 0;
    } else if (this.type === 'success') {
      this.currentIndex = 1;
    } else if (this.type === 'fail') {
      this.currentIndex = 2;
    }
  },
  components: (_components = {}, _components[Icon.name] = Icon, _components)
});

/* 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', [_c('div', {
    staticClass: "bx-result-status"
  }, [_c('div', {
    staticClass: "bx-result-status-body"
  }, [_c('div', {
    staticClass: "bx-result-content"
  }, [_c('bxs-icon', {
    attrs: {
      "name": _vm.dataArr[_vm.currentIndex].icon
    }
  }), _c('div', [_vm._v(_vm._s(_vm.title))])], 1), _c('div', {
    staticClass: "bx-img"
  }, [_c('img', {
    staticClass: "bx-img-block",
    attrs: {
      "src": _vm.dataArr[_vm.currentIndex].url
    }
  })])]), _vm._t("footer")], 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;
