import { defineComponent, ref, createVNode, mergeProps } from 'vue';
import '../_util/props-util/index.mjs';
import AjaxUpload from './AjaxUploader.mjs';
import { uploadProps } from './interface.mjs';
import initDefaultProps from '../_util/props-util/initDefaultProps.mjs';

function empty() {
}
var Upload = /* @__PURE__ */ defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "Upload",
  inheritAttrs: false,
  props: initDefaultProps(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 = ref();
    const abort = (file) => {
      var _a;
      (_a = uploader.value) == null ? void 0 : _a.abort(file);
    };
    expose({
      abort
    });
    return () => {
      return createVNode(AjaxUpload, mergeProps(props, attrs, {
        "ref": uploader
      }), slots);
    };
  }
});

export { Upload as default };
//# sourceMappingURL=Upload.mjs.map
