import * as React from 'react'; import type { QueryResultRow } from './query-report-table'; export declare function formatTestRunDuration(ms: number): string; /** Column-bar skeleton (header cells + one card row): fixed 160px columns on every breakpoint, scrolling horizontally when they do not fit. Bars use bg-ods-bg-surface like the table skeletons — the bg-ods-skeleton token is the same color as the card background and would be invisible on the row. */ export declare function TestResultsSkeleton(): React.JSX.Element; /** * Live test results rendered with the core DataTable (identical header, * skeleton, and card-row styling to the standard tables). Columns are derived * from the keys of the returned rows; wide result sets scroll horizontally. * Unlike the default tables, headers stay visible on every breakpoint. */ export declare function TestResultsTable({ rows, loading }: { rows: QueryResultRow[]; loading: boolean; }): React.JSX.Element; export interface TestRunResultsProps { isActive: boolean; displayRows: QueryResultRow[]; firstError: string | null; className?: string; } /** Red error banner with a copy-to-clipboard action, per the test-run design. */ export declare function TestRunErrorBanner({ error, className }: { error: string; className?: string; }): React.JSX.Element; /** Error line + empty state + result table for a finished/running test run. */ export declare function TestRunResults({ isActive, displayRows, firstError, className }: TestRunResultsProps): React.JSX.Element; /** Started / Duration stat cell shown in a test-run controls row. */ export declare function TimingStat({ value, label, className }: { value: string; label: string; className?: string; }): React.JSX.Element; /** Overall run outcome shown in a test-run controls row. */ export type TestRunStatus = 'idle' | 'running' | 'success' | 'error'; /** Status stat cell: "-" before the first run, then a colored state tag. */ export declare function TestRunStatusStat({ status, className }: { status: TestRunStatus; className?: string; }): React.JSX.Element; /** * The transport-side contract `useTestRunState` observes. Matches the shape * of a live-campaign hook (e.g. Fleet live queries in OpenFrame) without * depending on any concrete backend. */ export interface TestRunCampaignState { isRunning: boolean; startedAt: Date | null; /** '' before the first run, then 'pending' → 'finished'. */ campaignStatus: string; results: QueryResultRow[]; errors: Array<{ error: string; }>; stopCampaign: () => void; } /** * State machine for one live test run: wraps a campaign-shaped object with * the run/stop/reset flow, elapsed-duration ticking, and the display flags * test panels render from. The consumer starts the actual campaign inside the * `start` callback passed to `run`: * * ```tsx * const campaign = useLiveCampaign() // app-owned transport * const test = useTestRunState(campaign) * const handleRun = () => test.run(() => campaign.startCampaign(sql, [hostId])) * ``` */ export declare function useTestRunState(campaign: TestRunCampaignState): { hasRun: boolean; isActive: boolean; isFinished: boolean; showResults: boolean; status: TestRunStatus; firstError: string | null; startedLabel: string; durationLabel: string; displayRows: QueryResultRow[]; run: (start: () => Promise) => Promise; stop: () => void; reset: () => void; }; //# sourceMappingURL=test-run.d.ts.map