/** Appended to Work Order `actions_performed` (technical report) when the guide is finished. */
export const TROUBLESHOOT_GUIDE_COMPLETED_MARKER = '--- Troubleshooting guide (completed) ---';

/** Appended when a step could not be completed (reason required). */
export const TROUBLESHOOT_TREE_COULD_NOT_COMPLETE_MARKER = '--- Troubleshooting tree (could not complete step) ---';

export function technicalReportHasGuideCompleted(actionsPerformed: string | null | undefined): boolean {
  return Boolean(actionsPerformed?.includes(TROUBLESHOOT_GUIDE_COMPLETED_MARKER));
}
