'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
var AjaxUploader = require('./AjaxUploader.cjs');
var _interface = require('./interface.cjs');
var initDefaultProps = require('../../../utils/vue/initDefaultProps.cjs');

function empty() {
}
var VcUpload = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "Upload",
  inheritAttrs: false,
  props: initDefaultProps.initDefaultProps(_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, {
        ...props,
        ...attrs,
        "ref": uploader
      }, slots);
    };
  }
});

exports.default = VcUpload;
//# sourceMappingURL=Upload.cjs.map
