import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { faFileAlt } from "@fortawesome/free-solid-svg-icons/faFileAlt";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { DetailContainer, DetailIconContainer, DetailLink, DetailTextContent, DetailTitle, HighlightableText, } from "../../../renderer-components";
import { css } from "styled-components";
export function DocumentDetail({ result }) {
    return (_jsxs(DetailContainer, { children: [_jsx(DetailIconContainer, { children: _jsx(FontAwesomeIcon, { icon: faFileAlt }) }), _jsx(DetailTitle, { children: _jsx(HighlightableText, { result: result, path: "document.title" }) }), _jsx(DetailLink, { href: result.source.document.url, children: _jsx(HighlightableText, { result: result, path: "document.url" }) }), "document.content" in result.highlight ? (_jsx("div", { css: css `
            margin-top: 8px;
            max-width: 100%;
            line-height: 1em;
            max-height: 6em;
            overflow: hidden;
            text-overflow: ellipsis;
            word-wrap: break-word;
            word-break: break-word;
          `, children: _jsx(HighlightableText, { result: result, path: "document.content" }) })) : (_jsx("div", { css: css `
            margin-top: 8px;
            max-width: 100%;
            line-height: 1em;
            max-height: 6em;
            overflow: hidden;
            text-overflow: ellipsis;
            word-wrap: break-word;
            word-break: break-word;
          `, children: _jsx(DetailTextContent, { result: result, path: "document.summary" }) }))] }));
}
