import React from 'react';
import { useTheme } from "../../../../../lib/theming/useTheme";
import { ArchiveIcon as RowViewArchiveIcon } from "../row/ArchiveIcon";
import { FolderIcon as RowViewFolderIcon } from "../row/FolderIcon";
import { MarkupIcon as RowViewMarkupIcon } from "../row/MarkupIcon";
import { PdfIcon as RowViewPdfIcon } from "../row/PdfIcon";
import { PictureIcon as RowViewPictureIcon } from "../row/PictureIcon";
import { PresentationIcon as RowViewPresentationIcon } from "../row/PresentationIcon";
import { TableIcon as RowViewTableIcon } from "../row/TableIcon";
import { TextIcon as RowViewTextIcon } from "../row/TextIcon";
import { DocTextIcon as RowViewDocTextIcon } from "../row/DocTextIcon";
import { ArchiveIcon as TileViewArchiveIcon } from "../tile/ArchiveIcon";
import { FolderIcon as TileViewFolderIcon } from "../tile/FolderIcon";
import { MarkupIcon as TileViewMarkupIcon } from "../tile/MarkupIcon";
import { PdfIcon as TileViewPdfIcon } from "../tile/PdfIcon";
import { PictureIcon as TileViewPictureIcon } from "../tile/PictureIcon";
import { PresentationIcon as TileViewPresentationIcon } from "../tile/PresentationIcon";
import { TableIcon as TileViewTableIcon } from "../tile/TableIcon";
import { TextIcon as TileViewTextIcon } from "../tile/TextIcon";
import { DocTextIcon as TileViewDocTextIcon } from "../tile/DocTextIcon";
import { ValidationErrorIcon as RowValidationErrorIcon } from "../row/ValidationErrorIcon";
import { ValidationWarningIcon as RowValidationWarningIcon } from "../row/ValidationWarningIcon";
import { ValidationErrorIcon as TileValidationErrorIcon } from "../tile/ValidationErrorIcon";
import { ValidationWarningIcon as TileValidationWarningIcon } from "../tile/ValidationWarningIcon";
export var 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 = useTheme();
  var isTileView = view === 'tile';
  if (isTileView) {
    switch (type) {
      case 'error':
        return /*#__PURE__*/React.createElement(TileValidationErrorIcon, {
          size: size,
          color: theme.fileUploaderFileTypeErrorIconColor
        });
      case 'warning':
        return /*#__PURE__*/React.createElement(TileValidationWarningIcon, {
          size: size,
          color: theme.fileUploaderFileTypeWarningIconColor
        });
      case 'pdf':
        return /*#__PURE__*/React.createElement(TileViewPdfIcon, {
          size: size,
          color: theme.fileUploaderFileTypePdfIconColor
        });
      case 'code':
        return /*#__PURE__*/React.createElement(TileViewMarkupIcon, {
          size: size,
          color: theme.fileUploaderFileTypeCodeIconColor
        });
      case 'picture':
        return /*#__PURE__*/React.createElement(TileViewPictureIcon, {
          size: size,
          color: theme.fileUploaderFileTypePictureIconColor
        });
      case 'presentation':
        return /*#__PURE__*/React.createElement(TileViewPresentationIcon, {
          size: size,
          color: theme.fileUploaderFileTypePresentationIconColor
        });
      case 'table':
        return /*#__PURE__*/React.createElement(TileViewTableIcon, {
          size: size,
          color: theme.fileUploaderFileTypeTableIconColor
        });
      case 'text':
        return /*#__PURE__*/React.createElement(TileViewTextIcon, {
          size: size,
          color: theme.fileUploaderFileTypeTextIconColor
        });
      case 'archive':
        return /*#__PURE__*/React.createElement(TileViewArchiveIcon, {
          size: size,
          color: theme.fileUploaderFileTypeArchiveIconColor
        });
      case 'folder':
        return /*#__PURE__*/React.createElement(TileViewFolderIcon, {
          size: size,
          color: theme.fileUploaderFileTypeFolderIconColor
        });
      default:
        return /*#__PURE__*/React.createElement(TileViewDocTextIcon, {
          size: size,
          color: theme.fileUploaderFileTypeUnknownIconColor
        });
    }
  }
  switch (type) {
    case 'error':
      return /*#__PURE__*/React.createElement(RowValidationErrorIcon, {
        size: size,
        color: theme.fileUploaderFileTypeErrorIconColor
      });
    case 'warning':
      return /*#__PURE__*/React.createElement(RowValidationWarningIcon, {
        size: size,
        color: theme.fileUploaderFileTypeWarningIconColor
      });
    case 'pdf':
      return /*#__PURE__*/React.createElement(RowViewPdfIcon, {
        size: size,
        color: theme.fileUploaderFileTypePdfIconColor
      });
    case 'code':
      return /*#__PURE__*/React.createElement(RowViewMarkupIcon, {
        size: size,
        color: theme.fileUploaderFileTypeCodeIconColor
      });
    case 'picture':
      return /*#__PURE__*/React.createElement(RowViewPictureIcon, {
        size: size,
        color: theme.fileUploaderFileTypePictureIconColor
      });
    case 'presentation':
      return /*#__PURE__*/React.createElement(RowViewPresentationIcon, {
        size: size,
        color: theme.fileUploaderFileTypePresentationIconColor
      });
    case 'table':
      return /*#__PURE__*/React.createElement(RowViewTableIcon, {
        size: size,
        color: theme.fileUploaderFileTypeTableIconColor
      });
    case 'text':
      return /*#__PURE__*/React.createElement(RowViewTextIcon, {
        size: size,
        color: theme.fileUploaderFileTypeTextIconColor
      });
    case 'archive':
      return /*#__PURE__*/React.createElement(RowViewArchiveIcon, {
        size: size,
        color: theme.fileUploaderFileTypeArchiveIconColor
      });
    case 'folder':
      return /*#__PURE__*/React.createElement(RowViewFolderIcon, {
        size: size,
        color: theme.fileUploaderFileTypeFolderIconColor
      });
    default:
      return /*#__PURE__*/React.createElement(RowViewDocTextIcon, {
        size: size,
        color: theme.fileUploaderFileTypeUnknownIconColor
      });
  }
};