import { jsx as _jsx } from "react/jsx-runtime";
import { faFilePdf } from "@fortawesome/free-solid-svg-icons/faFilePdf";
import { faGlobe } from "@fortawesome/free-solid-svg-icons/faGlobe";
import { faMapPin } from "@fortawesome/free-solid-svg-icons/faMapPin";
import { faTag } from "@fortawesome/free-solid-svg-icons/faTag";
import { faUser } from "@fortawesome/free-solid-svg-icons/faUser";
import { faSitemap } from "@fortawesome/free-solid-svg-icons/faSitemap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { css } from "styled-components";
export function TokenIcon({ token }) {
    return (_jsx("div", { className: "openk9-token-icon", css: css `
        width: 16px;
        display: flex;
        margin-right: 8px;
        justify-content: center;
        align-items: center;
      `, children: (() => {
            switch (token.tokenType) {
                case "DOCTYPE": {
                    switch (token.value) {
                        case "pdf":
                            return _jsx(FontAwesomeIcon, { icon: faFilePdf });
                        case "web":
                            return _jsx(FontAwesomeIcon, { icon: faGlobe });
                        default:
                            return _jsx(FontAwesomeIcon, { icon: faTag });
                    }
                }
                case "ENTITY": {
                    switch (token.entityType) {
                        case "person":
                            return _jsx(FontAwesomeIcon, { icon: faUser });
                        case "loc":
                            return _jsx(FontAwesomeIcon, { icon: faMapPin });
                        case "organization":
                            return _jsx(FontAwesomeIcon, { icon: faSitemap });
                        default:
                            return _jsx(FontAwesomeIcon, { icon: faTag });
                    }
                }
                default:
                    return _jsx(FontAwesomeIcon, { icon: faTag });
            }
        })() }));
}
