import { OnInit, OnDestroy, EventEmitter, ChangeDetectorRef } from '@angular/core';
import { TestingInstrumentationService, TestRunSummary, SuiteHierarchyNode } from '../services/testing-instrumentation.service';
import { KPICardData } from '../../AI/components/widgets/kpi-card.component';
import { TestingExecutionService, TestingDialogService } from '@memberjunction/ng-testing';
import * as i0 from "@angular/core";
/** Status type union matching TestRunSummary */
type TestRunStatus = 'Passed' | 'Failed' | 'Skipped' | 'Error' | 'Running' | 'Timeout';
/** Alert item for the alerts section */
interface TestAlert {
    id: string;
    testName: string;
    reason: 'regression' | 'low-score';
    score: number;
    status: TestRunStatus;
    runDateTime: Date;
}
export declare class TestingDashboardTabComponent implements OnInit, OnDestroy {
    private instrumentationService;
    private executionService;
    private testingDialogService;
    private cdr;
    initialState: Record<string, unknown> | null;
    /** When true, the inner bespoke .page-header is hidden — the parent shell owns the chrome. */
    HideToolbar: boolean;
    stateChange: EventEmitter<Record<string, unknown>>;
    private destroy$;
    /** Resolved data for the template */
    IsLoading: boolean;
    KpiCards: KPICardData[];
    RunningTests: TestRunSummary[];
    RecentRuns: TestRunSummary[];
    SortedSuites: SuiteHierarchyNode[];
    Alerts: TestAlert[];
    private activeRunsMap;
    constructor(instrumentationService: TestingInstrumentationService, executionService: TestingExecutionService, testingDialogService: TestingDialogService, cdr: ChangeDetectorRef);
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    OnRefresh(): void;
    OnViewRunningTest(run: TestRunSummary): void;
    GetActiveRunProgress(testId: string): number;
    GetActiveRunStep(testId: string): string;
    OnOpenRun(run: TestRunSummary): void;
    OnOpenAlert(alert: TestAlert): void;
    FormatDuration(ms: number): string;
    FormatTimestamp(date: Date): string;
    FormatCost(cost: number): string;
    GetPassRateColor(rate: number): string;
    private subscribeToStreams;
    private subscribeActiveRuns;
    private subscribeLoading;
    private subscribeKpis;
    private subscribeTestRuns;
    private subscribeSuites;
    private buildKpiCards;
    private buildAlerts;
    /** Find tests that previously passed but now fail */
    private detectRegressions;
    /** Flag tests with scores below 0.5 */
    private detectLowScores;
    /** Flatten suite hierarchy and sort by worst health first */
    private flattenAndSort;
    private collectNodes;
    static ɵfac: i0.ɵɵFactoryDeclaration<TestingDashboardTabComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TestingDashboardTabComponent, "app-testing-dashboard-tab", never, { "initialState": { "alias": "initialState"; "required": false; }; "HideToolbar": { "alias": "HideToolbar"; "required": false; }; }, { "stateChange": "stateChange"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=testing-dashboard-tab.component.d.ts.map