import { UploadFile } from 'ant-design-vue'

export type Props = {
  style: any
  
  modelValue: string | string[]

  
  status?: 'normal' | 'uploading' | 'error' | 'info'

  
  imageName?: string | string[]

  
  accept?: string

  
  acceptVideo?: boolean

  
  acceptAudio?: boolean

  
  showImageName?: boolean

  
  baseUrl?: string

  
  serviceName?: string

  
  pathPrefix?: string

  
  bucketName?: string

  
  minioTokenApi?: string

  
  maxSize?: number | string

  
  limitNum?: number

  
  errorMessage?: string

  
  customCheck?: (file: UploadFile) => boolean | Promise<any>

  
  needPreview?: boolean

  
  needDownloadBtn?: boolean

  
  needDeleteBtn?: boolean

  
  needChangeBtn?: boolean

  
  mode?: 'upload' | 'view'

  
  previewBtnConfig?:
    | boolean
    | {
        
        zoom_in?: boolean
        
        zoom_out?: boolean
        
        turn_left?: boolean
        
        turn_right?: boolean
        
        full_screen?: boolean
      }

  
  imageFit?: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'

  
  autoContentType?: boolean

  
  message?: string

  
  videoWidth?: number

  
  videoHeight?: number

  
  randomName?: boolean

  
  useOriginUrl?: boolean

  
  openFileDialogOnClick?: boolean
}

export interface Emits {
  
  (e: 'update:modelValue', val: string): void

  
  (e: 'update:status', val: string): void

  
  (e: 'downloadImage', val: string): void

  
  (e: 'image-upload', file: UploadFile): void

  
  (e: 'upload-success', file: UploadFile, url: string): void

  
  (e: 'clickChangeIcon', url: string): void

  
  (e: 'deleteImage', val: string): void
}
