import FolderIcon from '@material-hu/icons/material/Folder';
import InsertDriveFileIcon from '@material-hu/icons/material/InsertDriveFile';

import { FileType } from 'src/types/files';

export const ALLOWED_FILE_TYPES = {
  'image/png': [],
  'image/gif': [],
  'image/jpeg': [],
  'image/webp': [],
  'application/pdf': [],
  'application/msword': [],
  'application/vnd.ms-powerpoint': [],
  'application/vnd.ms-excel': [],
  'text/csv': [],
  'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': [],
  'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [],
  'application/vnd.openxmlformats-officedocument.presentationml.presentation':
    [],
  'application/vnd.openxmlformats-officedocument.presentationml.slideshow': [
    '.ppsx',
  ],
  'application/vnd.ms-excel.sheet.macroEnabled.12': ['.xlsm'],
  'application/vnd.ms-powerpoint.slideshow.macroenabled.12': ['.ppsm'],
  'video/x-msvideo': [],
  'video/mpeg': [],
  'video/webm': [],
  'video/mp4': [],
  'video/quicktime': [],
};

export const TYPE_MAP = {
  [FileType.FILE]: { Icon: <InsertDriveFileIcon />, canDownload: true },
  [FileType.FOLDER]: { Icon: <FolderIcon />, canDownload: false },
} as const;
