import { RichTextValue } from '../../components/RichTextValue/RichTextValue'; import { highlightText } from '../../components/HighlightText/highlight-text'; import { TriangleIcon } from '../../components/TriangleIcon'; import { powerShellDisplayLines, type FindingFirstRead as Summary } from './first-read'; /** Scanner first read: what the scanner found here, why it matters, and what to do next. */ export function FindingFirstRead({ summary, outcome, search, onResults }: { summary: Summary; outcome: string; search: string; onResults?: () => void; }) { return <> {summary.rows.length > 0 &&

{summary.heading}

{summary.rows.map((row, index) =>
{row.label}
{row.state ? {highlightText(row.value, search)} : }
)}
} {(summary.nextStep || summary.link) &&

Next step

{summary.nextStep?.lead && } {summary.nextStep?.command &&
{highlightText(powerShellDisplayLines(summary.nextStep.command).join('\n'), search)}
} {summary.nextStep?.rest &&
Full remediation
} {summary.link &&

{summary.link.label}

}
} ; }