import { UploadFile } from "antd";

export enum DageUploadType {
  /** 缩略图 */
  THUMB = "thumb",
  /** 模型 */
  MODEL = "model",
  /** 视频 */
  VIDEO = "video",
  /** 图片 */
  IMG = "img",
  /** 音频 */
  AUDIO = "audio",
  /** 文档 */
  DOC = "doc",
}

export interface DageFileResponseType extends UploadFile {
  dType: DageUploadType;
}

export interface DageUploadProps {
  action: string;
  value?: DageFileResponseType[];
  maxCount?: number;
  /**
   * 最大尺寸（M），默认 5M
   */
  maxSize?: number;
  type?: DageUploadType;
  tips?: string;
  disabled?: boolean;
  onUploading?(): void;
  onUploaded?(): void;
  onChange?(list: DageFileResponseType[]): void;
}
