import { jsx as _jsx } from "react/jsx-runtime";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faFileAlt } from "@fortawesome/free-solid-svg-icons/faFileAlt";
import { faFilePdf } from "@fortawesome/free-solid-svg-icons/faFilePdf";
import { faFileExcel } from "@fortawesome/free-solid-svg-icons/faFileExcel";
import { faFileWord } from "@fortawesome/free-solid-svg-icons/faFileWord";
import { faFilePowerpoint } from "@fortawesome/free-solid-svg-icons/faFilePowerpoint";
import { faEnvelope } from "@fortawesome/free-solid-svg-icons/faEnvelope";
import { faImage } from "@fortawesome/free-solid-svg-icons/faImage";
export function FileIcon({ result, }) {
    contentTypeSet.add(result.source.document.contentType);
    if (result.source.document.contentType === "application/pdf")
        return _jsx(FontAwesomeIcon, { icon: faFilePdf });
    if (result.source.document.contentType ===
        "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") {
        return _jsx(FontAwesomeIcon, { icon: faFileExcel });
    }
    if (result.source.document.contentType ===
        "application/vnd.openxmlformats-officedocument.presentationml.presentation") {
        return _jsx(FontAwesomeIcon, { icon: faFilePowerpoint });
    }
    if (result.source.document.contentType ===
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document") {
        return _jsx(FontAwesomeIcon, { icon: faFileWord });
    }
    if (result.source.document.contentType === "application/msword") {
        return _jsx(FontAwesomeIcon, { icon: faFileWord });
    }
    if (result.source.document.contentType === "image/png") {
        return _jsx(FontAwesomeIcon, { icon: faImage });
    }
    if (result.source.document.contentType === "image/jpeg") {
        return _jsx(FontAwesomeIcon, { icon: faImage });
    }
    if (result.source.document.contentType === "image/jpg") {
        return _jsx(FontAwesomeIcon, { icon: faImage });
    }
    if (result.source.document.contentType === "message/rfc822") {
        return _jsx(FontAwesomeIcon, { icon: faEnvelope });
    }
    if (result.source.document.contentType === "application/mbox") {
        return _jsx(FontAwesomeIcon, { icon: faEnvelope });
    }
    return _jsx(FontAwesomeIcon, { icon: faFileAlt });
}
export const contentTypeSet = new Set();
