import { OnInit, OnDestroy, EventEmitter, ChangeDetectorRef } from '@angular/core';
import { Observable } from 'rxjs';
import { TestingInstrumentationService, TestTrendData, TestAnalytics } from '../services/testing-instrumentation.service';
import * as i0 from "@angular/core";
interface TimeRangeOption {
    label: string;
    days: number;
}
interface ScoreDistributionBucket {
    label: string;
    color: string;
    count: number;
    percentage: number;
}
interface VersionRow {
    version: string;
    gitCommitShort: string;
    agentVersion: string;
    date: Date;
    totalTests: number;
    passRate: number;
    totalCost: number;
    passRateDelta: number | null;
    costDelta: number | null;
}
export declare class TestingAnalyticsComponent implements OnInit, OnDestroy {
    private instrumentationService;
    private cdr;
    initialState: Record<string, unknown> | null;
    stateChange: EventEmitter<Record<string, unknown>>;
    TimeRanges: TimeRangeOption[];
    SelectedDays: number;
    VersionRows: VersionRow[];
    IsLoadingVersions: boolean;
    DisplayTrends$: Observable<TestTrendData[]>;
    PassRateTrendDirection$: Observable<'up' | 'down' | 'stable'>;
    TopFailingTests$: Observable<TestAnalytics['topFailingTests']>;
    SlowestTests$: Observable<TestAnalytics['slowestTests']>;
    MostExpensiveTests$: Observable<TestAnalytics['mostExpensiveTests']>;
    ScoreDistribution$: Observable<ScoreDistributionBucket[]>;
    private destroy$;
    private maxTrendRuns;
    constructor(instrumentationService: TestingInstrumentationService, cdr: ChangeDetectorRef);
    ngOnInit(): void;
    ngOnDestroy(): void;
    OnTimeRangeSelect(days: number): void;
    Refresh(): void;
    PassRate(t: TestTrendData): number;
    PassRateClass(t: TestTrendData): string;
    SegmentPct(t: TestTrendData, segment: 'passed' | 'failed' | 'skipped'): number;
    ScoreBarClass(score: number): string;
    ScoreTextClass(score: number): string;
    CostBarPct(t: TestTrendData, all: TestTrendData[]): number;
    FormatBucketDate(d: Date): string;
    FormatDuration(ms: number): string;
    AbsNum(n: number): number;
    /** trackBy for trend @for loops */
    trackTrend(index: number, t: TestTrendData): number;
    private restoreState;
    private setupObservables;
    private calculateTrendDirection;
    private averagePassRate;
    private buildScoreDistribution;
    private loadVersionMetrics;
    private buildVersionRows;
    private emitState;
    static ɵfac: i0.ɵɵFactoryDeclaration<TestingAnalyticsComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TestingAnalyticsComponent, "app-testing-analytics", never, { "initialState": { "alias": "initialState"; "required": false; }; }, { "stateChange": "stateChange"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=testing-analytics.component.d.ts.map