import type { DatasetSheet } from '../../domain/dataset'; import type { FindingRecord } from '../../domain/finding'; import { linkResultSheets } from '../../profiles/purple-knight/result-linker'; import { linkPingCastleSectionSheets } from '../../profiles/pingcastle/pingcastle-section-links'; import { inlineResultTableSheets } from './inline-result-tables'; import { resultMessageFor } from './result-message'; /** One evidence selection for Work's Results window and its frozen view export. */ export function recordResultSheets(record: FindingRecord, sheets: DatasetSheet[], activeSheetId: string, fallbackToolId?: string) { return [ ...linkResultSheets(record, sheets, activeSheetId), ...linkPingCastleSectionSheets(record, sheets), ...(resultMessageFor(record, fallbackToolId) ? [] : inlineResultTableSheets(record)) ]; }