'use strict';

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

var vue = require('vue');
require('../_util/props-util/index.js');
var AjaxUploader = require('./AjaxUploader.js');
var _interface = require('./interface.js');
var initDefaultProps = require('../_util/props-util/initDefaultProps.js');

function empty() {
}
var Upload = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "Upload",
  inheritAttrs: false,
  props: initDefaultProps.default(_interface.uploadProps(), {
    componentTag: "span",
    prefixCls: "rc-upload",
    data: {},
    headers: {},
    name: "file",
    multipart: false,
    onStart: empty,
    onError: empty,
    onSuccess: empty,
    multiple: false,
    beforeUpload: null,
    customRequest: null,
    withCredentials: false,
    openFileDialogOnClick: true
  }),
  setup(props, {
    slots,
    attrs,
    expose
  }) {
    const uploader = vue.ref();
    const abort = (file) => {
      var _a;
      (_a = uploader.value) == null ? void 0 : _a.abort(file);
    };
    expose({
      abort
    });
    return () => {
      return vue.createVNode(AjaxUploader.default, vue.mergeProps(props, attrs, {
        "ref": uploader
      }), slots);
    };
  }
});

exports.default = Upload;
//# sourceMappingURL=Upload.js.map
