import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faFilePdf } from "@fortawesome/free-solid-svg-icons/faFilePdf";
import { HighlightableText, } from "../../../renderer-components";
import { ResultTitleTwo } from "../../../renderer-components/ResultTitleTwo";
import { ResultContainerTwo } from "../../../renderer-components/ResultContainerTwo";
import { ResultLinkTwo } from "../../../renderer-components/ResultLinkTwo";
import { MoreDetailCard } from "../../../renderer-components/MoreDetailCard";
import { ResultTextContentTwo } from "../../../renderer-components/ResultTextContentTwo";
import { css } from "styled-components";
export function PdfResult({ result }) {
    const lastEdit = new Date(result.source.file.lastModifiedDate)
        .toLocaleString()
        .replace(",", "");
    return (_jsxs(ResultContainerTwo, { children: [_jsx(ResultTitleTwo, { children: _jsx(HighlightableText, { result: result, path: "document.title" }) }), "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;
            font-weight: 400;
            font-size: 15px;
            color: #71717a;
          `, 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;
            font-weight: 400;
            font-size: 15px;
            color: #71717a;
          `, children: _jsx(ResultTextContentTwo, { result: result, path: "document.summary" }) })), _jsx(MoreDetailCard, { icon: _jsx(FontAwesomeIcon, { icon: faFilePdf }), date: lastEdit }), _jsx(ResultLinkTwo, { href: result.source.document.url, title: "Link Documento", children: _jsx(HighlightableText, { result: result, path: "document.url" }) })] }));
}
