import type { RailDeckDirectIntegrationClient as Client } from '@raildeck/frontend-sdk/direct-integration'; /** * Read saved comparisons and then the pair explicitly chosen for review. * @param client - Configured client; the caller owns current authority. * @param accountId - Authorised account for this workflow. * @param locomotiveId - Explicitly selected locomotive. * @param pairId - Saved comparison chosen by the operator. * @param signal - Caller-owned cancellation signal. * @returns Saved comparison evidence, without a speed command or physical verification. */ export async function openSelectedComparison( client: Client, accountId: string, locomotiveId: string, pairId: string, signal: AbortSignal, ) { const options = { signal, timeoutMs: 15_000 }; const pairs = await client.locomotiveMatching.list(accountId, locomotiveId, options); const selected = await client.locomotiveMatching.get(accountId, locomotiveId, pairId, options); return { pairs, selected }; }