"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const runtime = require("../../../utils/vue/props/runtime.js");
const shared_esmBundler = require("../../../../../@vue/shared/dist/shared.esm-bundler.js");
const typescript = require("../../../utils/typescript.js");
const ajax = require("./ajax.js");
const uploadListTypes = [
  "text",
  "picture",
  "picture-card"
];
let fileId = 1;
const genFileId = () => Date.now() + fileId++;
const uploadBaseProps = runtime.buildProps({
  action: {
    type: String,
    default: "#"
  },
  headers: { type: runtime.definePropType(Object) },
  method: {
    type: String,
    default: "post"
  },
  data: {
    type: runtime.definePropType([
      Object,
      Function,
      Promise
    ]),
    default: () => typescript.mutable({})
  },
  multiple: Boolean,
  name: {
    type: String,
    default: "file"
  },
  drag: Boolean,
  withCredentials: Boolean,
  showFileList: {
    type: Boolean,
    default: true
  },
  accept: {
    type: String,
    default: ""
  },
  fileList: {
    type: runtime.definePropType(Array),
    default: () => typescript.mutable([])
  },
  autoUpload: {
    type: Boolean,
    default: true
  },
  listType: {
    type: String,
    values: uploadListTypes,
    default: "text"
  },
  httpRequest: {
    type: runtime.definePropType(Function),
    default: ajax.ajaxUpload
  },
  disabled: {
    type: Boolean,
    default: void 0
  },
  limit: Number,
  directory: Boolean
});
const uploadProps = runtime.buildProps({
  ...uploadBaseProps,
  beforeUpload: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  beforeRemove: { type: runtime.definePropType(Function) },
  onRemove: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onChange: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onPreview: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onSuccess: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onProgress: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onError: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  onExceed: {
    type: runtime.definePropType(Function),
    default: shared_esmBundler.NOOP
  },
  crossorigin: { type: runtime.definePropType(String) }
});
exports.genFileId = genFileId;
exports.uploadBaseProps = uploadBaseProps;
exports.uploadListTypes = uploadListTypes;
exports.uploadProps = uploadProps;
