"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.FileUploaderFileTypeIcon = void 0;var _react = _interopRequireDefault(require("react"));



var _useTheme = require("../../../../lib/theming/useTheme");

var _ArchiveIcon = require("./row/ArchiveIcon");
var _FolderIcon = require("./row/FolderIcon");
var _MarkupIcon = require("./row/MarkupIcon");
var _PdfIcon = require("./row/PdfIcon");
var _PictureIcon = require("./row/PictureIcon");
var _PresentationIcon = require("./row/PresentationIcon");
var _TableIcon = require("./row/TableIcon");
var _TextIcon = require("./row/TextIcon");
var _DocTextIcon = require("./row/DocTextIcon");
var _ArchiveIcon2 = require("./tile/ArchiveIcon");
var _FolderIcon2 = require("./tile/FolderIcon");
var _MarkupIcon2 = require("./tile/MarkupIcon");
var _PdfIcon2 = require("./tile/PdfIcon");
var _PictureIcon2 = require("./tile/PictureIcon");
var _PresentationIcon2 = require("./tile/PresentationIcon");
var _TableIcon2 = require("./tile/TableIcon");
var _TextIcon2 = require("./tile/TextIcon");
var _DocTextIcon2 = require("./tile/DocTextIcon");
var _ValidationErrorIcon = require("./row/ValidationErrorIcon");
var _ValidationWarningIcon = require("./row/ValidationWarningIcon");
var _ValidationErrorIcon2 = require("./tile/ValidationErrorIcon");
var _ValidationWarningIcon2 = require("./tile/ValidationWarningIcon");







var FileUploaderFileTypeIcon = exports.FileUploaderFileTypeIcon = function FileUploaderFileTypeIcon(_ref)



{var size = _ref.size,type = _ref.type,_ref$view = _ref.view,view = _ref$view === void 0 ? 'row' : _ref$view;
  var theme = (0, _useTheme.useTheme)();
  var isTileView = view === 'tile';

  if (isTileView) {
    switch (type) {
      case 'error':
        return /*#__PURE__*/_react.default.createElement(_ValidationErrorIcon2.ValidationErrorIcon, { size: size, color: theme.fileUploaderFileTypeErrorIconColor });
      case 'warning':
        return /*#__PURE__*/_react.default.createElement(_ValidationWarningIcon2.ValidationWarningIcon, { size: size, color: theme.fileUploaderFileTypeWarningIconColor });
      case 'pdf':
        return /*#__PURE__*/_react.default.createElement(_PdfIcon2.PdfIcon, { size: size, color: theme.fileUploaderFileTypePdfIconColor });
      case 'code':
        return /*#__PURE__*/_react.default.createElement(_MarkupIcon2.MarkupIcon, { size: size, color: theme.fileUploaderFileTypeCodeIconColor });
      case 'picture':
        return /*#__PURE__*/_react.default.createElement(_PictureIcon2.PictureIcon, { size: size, color: theme.fileUploaderFileTypePictureIconColor });
      case 'presentation':
        return /*#__PURE__*/_react.default.createElement(_PresentationIcon2.PresentationIcon, { size: size, color: theme.fileUploaderFileTypePresentationIconColor });
      case 'table':
        return /*#__PURE__*/_react.default.createElement(_TableIcon2.TableIcon, { size: size, color: theme.fileUploaderFileTypeTableIconColor });
      case 'text':
        return /*#__PURE__*/_react.default.createElement(_TextIcon2.TextIcon, { size: size, color: theme.fileUploaderFileTypeTextIconColor });
      case 'archive':
        return /*#__PURE__*/_react.default.createElement(_ArchiveIcon2.ArchiveIcon, { size: size, color: theme.fileUploaderFileTypeArchiveIconColor });
      case 'folder':
        return /*#__PURE__*/_react.default.createElement(_FolderIcon2.FolderIcon, { size: size, color: theme.fileUploaderFileTypeFolderIconColor });
      default:
        return /*#__PURE__*/_react.default.createElement(_DocTextIcon2.DocTextIcon, { size: size, color: theme.fileUploaderFileTypeUnknownIconColor });
    }
  }
  switch (type) {
    case 'error':
      return /*#__PURE__*/_react.default.createElement(_ValidationErrorIcon.ValidationErrorIcon, { size: size, color: theme.fileUploaderFileTypeErrorIconColor });
    case 'warning':
      return /*#__PURE__*/_react.default.createElement(_ValidationWarningIcon.ValidationWarningIcon, { size: size, color: theme.fileUploaderFileTypeWarningIconColor });
    case 'pdf':
      return /*#__PURE__*/_react.default.createElement(_PdfIcon.PdfIcon, { size: size, color: theme.fileUploaderFileTypePdfIconColor });
    case 'code':
      return /*#__PURE__*/_react.default.createElement(_MarkupIcon.MarkupIcon, { size: size, color: theme.fileUploaderFileTypeCodeIconColor });
    case 'picture':
      return /*#__PURE__*/_react.default.createElement(_PictureIcon.PictureIcon, { size: size, color: theme.fileUploaderFileTypePictureIconColor });
    case 'presentation':
      return /*#__PURE__*/_react.default.createElement(_PresentationIcon.PresentationIcon, { size: size, color: theme.fileUploaderFileTypePresentationIconColor });
    case 'table':
      return /*#__PURE__*/_react.default.createElement(_TableIcon.TableIcon, { size: size, color: theme.fileUploaderFileTypeTableIconColor });
    case 'text':
      return /*#__PURE__*/_react.default.createElement(_TextIcon.TextIcon, { size: size, color: theme.fileUploaderFileTypeTextIconColor });
    case 'archive':
      return /*#__PURE__*/_react.default.createElement(_ArchiveIcon.ArchiveIcon, { size: size, color: theme.fileUploaderFileTypeArchiveIconColor });
    case 'folder':
      return /*#__PURE__*/_react.default.createElement(_FolderIcon.FolderIcon, { size: size, color: theme.fileUploaderFileTypeFolderIconColor });
    default:
      return /*#__PURE__*/_react.default.createElement(_DocTextIcon.DocTextIcon, { size: size, color: theme.fileUploaderFileTypeUnknownIconColor });
  }
};