import { defineComponent, ref, createVNode } from 'vue';
import '../../../utils/index.mjs';
import AjaxUpload from './AjaxUploader.mjs';
import { uploadProps } from './interface.mjs';
import { initDefaultProps } from '../../../utils/vue/initDefaultProps.mjs';

function empty() {
}
var VcUpload = /* @__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, {
        ...props,
        ...attrs,
        "ref": uploader
      }, slots);
    };
  }
});

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