"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _constants = require("../../../constants");
var extractFileFormatIcon = function extractFileFormatIcon(fileFormat) {
  switch (fileFormat) {
    // Generic documents
    case 'folder':
      return {
        icon: _constants.IconType.Folder
      };
    case 'text/plain':
    case 'application/vnd.oasis.opendocument.text':
    case 'application/vnd.apple.pages':
      return {
        icon: _constants.IconType.Document
      };
    case 'application/pdf':
      return {
        icon: _constants.IconType.PDF
      };
    case 'application/vnd.oasis.opendocument.presentation':
    case 'application/vnd.apple.keynote':
      return {
        icon: _constants.IconType.Presentation
      };
    case 'application/vnd.oasis.opendocument.spreadsheet':
    case 'application/vnd.apple.numbers':
      return {
        icon: _constants.IconType.Spreadsheet
      };
    // Google Drive
    case 'application/vnd.google-apps.document':
      return {
        icon: _constants.IconType.GoogleDocs
      };
    case 'application/vnd.google-apps.form':
      return {
        icon: _constants.IconType.GoogleForms
      };
    case 'application/vnd.google-apps.spreadsheet':
      return {
        icon: _constants.IconType.GoogleSheets
      };
    case 'application/vnd.google-apps.presentation':
      return {
        icon: _constants.IconType.GoogleSlides
      };
    // Microsoft
    case 'application/vnd.ms-excel':
    case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
      return {
        icon: _constants.IconType.MSExcel
      };
    case 'application/vnd.ms-powerpoint':
    case 'application/vnd.openxmlformats-officedocument.presentationml.presentation':
      return {
        icon: _constants.IconType.MSPowerpoint
      };
    case 'application/msword':
    case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
      return {
        icon: _constants.IconType.MSWord
      };
    case 'image/png':
    case 'image/jpeg':
    case 'image/bmp':
    case 'image/webp':
    case 'image/svg+xml':
      return {
        icon: _constants.IconType.Image
      };
    case 'image/gif':
      return {
        icon: _constants.IconType.GIF
      };
    case 'audio/midi':
    case 'audio/mpeg':
    case 'audio/webm':
    case 'audio/ogg':
    case 'audio/wav':
      return {
        icon: _constants.IconType.Audio
      };
    case 'video/mp4':
    case 'video/quicktime':
    case 'video/mov':
    case 'video/webm':
    case 'video/ogg':
    case 'video/x-ms-wmv':
    case 'video/x-msvideo':
      return {
        icon: _constants.IconType.Video
      };
    // Others
    case 'text/css':
    case 'text/html':
    case 'application/javascript':
      return {
        icon: _constants.IconType.Code
      };
    case 'application/zip':
    case 'application/x-tar':
    case 'application/x-gtar':
    case 'application/x-7z-compressed':
    case 'application/x-apple-diskimage':
    case 'application/vnd.rar':
      return {
        icon: _constants.IconType.Archive
      };
    case 'application/dmg':
      return {
        icon: _constants.IconType.Executable
      };
    case 'application/sketch':
      return {
        icon: _constants.IconType.Sketch
      };
    case 'application/octet-stream':
      return {
        icon: _constants.IconType.Generic
      };
    case 'application/invision.prototype':
      return {
        icon: _constants.IconType.Generic
      };
    default:
      return undefined;
  }
};
var _default = exports.default = extractFileFormatIcon;