'use strict';Object.defineProperty(exports,'__esModule',{value:true});var normalizeComponent=require('./normalize-component-d9981c57.js');require('./es.number.constructor-daccdeab.js'),require('./es.array.includes-3990bfec.js');var BaseIcon=require('./BaseIcon-1ed3bf6e.js');require('./export-61511812.js'),require('./object-set-prototype-of-dfa14cf5.js'),require('./object-keys-12f2c5e5.js'),require('./es.array.concat-bb8715dc.js'),require('./array-species-create-c414c2ec.js'),require('./create-property-240c71a5.js'),require('./array-method-has-species-support-983ac207.js'),require('./es.array.join-88750c41.js'),require('./array-method-is-strict-99341ee3.js');/**
 * The status bar displayed during file upload
 * ** WILL BE DEPRECATED **
 * ** USE IMPROVED COMPONENT BASEPROGESSBAR **
  */

var script = {
  name: 'BaseUploadBar',
  components: {
    BaseIcon: BaseIcon["default"]
  },
  props: {
    /**
     * filename that will be displayed in the bar
     */
    filename: {
      type: String,
      required: true
    },

    /**
     * filesize that will be displayed in the bar
     */
    filesize: {
      type: String,
      default: ''
    },

    /**
     * progress of the upload (percentage ratio)
     */
    progress: {
      type: [Number, String],
      default: 0
    },

    /**
     * indicate the success or fail of an upload <br>
     *   allowed values: 'sucess' | 'fail' | ''
     */
    status: {
      type: String,
      default: '',
      validator: function validator(val) {
        return ['success', 'fail', ''].includes(val);
      }
    },

    /**
     * show an remove icon
     */
    showRemove: {
      type: Boolean,
      default: true
    }
  },
  data: function data() {
    return {
      progressWidth: 0
    };
  },
  watch: {
    progress: function progress(val) {
      this.progressWidth = val * 100;
    }
  },
  methods: {
    remove: function remove() {
      /**
       * event triggered on remove icon click
       *
       * @event remove-item
       * @type { none }
       */
      this.$emit('remove-item');
    }
  }
};/* 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: "base-upload-bar"
  }, [_vm._ssrNode("<div" + _vm._ssrClass(null, ['base-upload-bar-text', _vm.progressWidth > 80 ? 'base-upload-bar-text-complete' : 'base-upload-bar-text-incomplete']) + " data-v-07b50b84><span data-v-07b50b84>" + _vm._ssrEscape(_vm._s(_vm.$props.filename)) + "</span> <span class=\"base-upload-bar-file-size\" data-v-07b50b84>" + _vm._ssrEscape(_vm._s(_vm.$props.filesize)) + "</span></div> <div class=\"base-upload-bar-progress\"" + _vm._ssrStyle(null, {
    'width': _vm.progressWidth + '%'
  }, null) + " data-v-07b50b84></div> "), _vm.status === 'success' ? _c('base-icon', {
    staticClass: "base-upload-bar-status-icon base-upload-bar-status-icon-success",
    attrs: {
      "name": "success"
    }
  }) : _vm._e(), _vm._ssrNode(" "), _vm.status === 'fail' ? _c('base-icon', {
    staticClass: "base-upload-bar-status-icon base-upload-bar-status-icon-fail",
    attrs: {
      "name": "attention"
    }
  }) : _vm._e(), _vm._ssrNode(" "), _vm.showRemove ? _c('base-icon', {
    staticClass: "base-upload-bar-status-icon base-upload-bar-status-icon-remove",
    attrs: {
      "name": "remove"
    },
    on: {
      "click": _vm.remove
    }
  }) : _vm._e()], 2);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

var __vue_scope_id__ = "data-v-07b50b84";
/* module identifier */

var __vue_module_identifier__ = "data-v-07b50b84";
/* functional template */

var __vue_is_functional_template__ = false;
/* style inject */

/* style inject SSR */

/* style inject shadow dom */

var __vue_component__ = /*#__PURE__*/normalizeComponent.n({
  render: __vue_render__,
  staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);

var BaseUploadBar = __vue_component__;var Plugin = {
  install: function install(Vue) {
    normalizeComponent.r(Vue, BaseUploadBar);
  }
};
normalizeComponent.u(Plugin);exports.BaseUploadBar=BaseUploadBar;exports["default"]=Plugin;