import { OnInit, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';
import { MJTestSuiteEntity, MJTestSuiteTestEntity, MJTestSuiteRunEntity, MJTestRunEntity } from '@memberjunction/core-entities';
import { MJTestSuiteFormComponent } from '../../generated/Entities/MJTestSuite/mjtestsuite.form.component';
import { TestRunComparison, EvaluationPreferences } from '@memberjunction/ng-testing';
import * as i0 from "@angular/core";
export declare class MJTestSuiteFormComponentExtended extends MJTestSuiteFormComponent implements OnInit, OnDestroy, AfterViewInit {
    record: MJTestSuiteEntity;
    private destroy$;
    activeTab: string;
    loading: boolean;
    loadingTests: boolean;
    loadingRuns: boolean;
    loadingAnalytics: boolean;
    loadingCompare: boolean;
    testsLoaded: boolean;
    runsLoaded: boolean;
    analyticsLoaded: boolean;
    isRefreshing: boolean;
    error: string | null;
    suiteTests: MJTestSuiteTestEntity[];
    suiteRuns: MJTestSuiteRunEntity[];
    analyticsData: AnalyticsDataPoint[];
    uniqueTags: string[];
    selectedTags: string[];
    analyticsTimeRange: '7d' | '30d' | '90d' | 'all';
    analyticsView: 'summary' | 'matrix' | 'chart';
    matrixData: MatrixDataPoint[];
    loadingMatrix: boolean;
    matrixLoaded: boolean;
    chartContainer: ElementRef<HTMLDivElement>;
    private chartRendered;
    compareRunA: MJTestSuiteRunEntity | null;
    compareRunB: MJTestSuiteRunEntity | null;
    compareResults: TestRunComparison[];
    compareRunATests: MJTestRunEntity[];
    compareRunBTests: MJTestRunEntity[];
    keyboardShortcutsEnabled: boolean;
    showShortcuts: boolean;
    private shortcutsSettingEntity;
    private metadata;
    evalPreferences: EvaluationPreferences;
    filtersCollapsed: boolean;
    matrixSortBy: 'sequence' | 'name';
    matrixSortAsc: boolean;
    selectedMatrixTestId: string | null;
    matrixTestFilter: string;
    private matrixFilterSubject$;
    private navigationService;
    private testingDialogService;
    private evalPrefsService;
    private viewContainerRef;
    private appManager;
    ngOnInit(): Promise<void>;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    handleKeyboardShortcut(event: KeyboardEvent): void;
    changeTab(tab: string): void;
    private loadTests;
    private loadRuns;
    getStatusColor(): string;
    getStatusClass(): string;
    getRunStatusColor(status: string): string;
    formatTimeout(ms: number | null): string;
    getRelativeTime(date: Date | string | null): string;
    getPassRate(run: MJTestSuiteRunEntity): number;
    openTest(testId: string): void;
    openSuiteRun(runId: string): void;
    navigateToTestingDashboard(): void;
    runSuite(): Promise<void>;
    refresh(): Promise<void>;
    private loadAnalytics;
    private runToDataPoint;
    getFilteredAnalyticsData(): AnalyticsDataPoint[];
    setTimeRange(range: '7d' | '30d' | '90d' | 'all'): void;
    /**
     * Toggle a tag in the multi-select filter.
     * If tag is null, clear all selections (show all tags).
     */
    toggleTagFilter(tag: string | null): void;
    /**
     * Check if a tag is currently selected in the filter
     */
    isTagSelected(tag: string): boolean;
    setAnalyticsView(view: 'summary' | 'matrix' | 'chart'): void;
    /**
     * Force reload of matrix data (used when filters change)
     */
    private reloadMatrixData;
    private loadMatrixData;
    /**
     * Load feedbacks for a batch of test run IDs
     * Returns a map of testRunId -> MJTestRunFeedbackEntity
     */
    private loadFeedbacksForTestRuns;
    getUniqueTestsFromMatrix(): {
        testId: string;
        testName: string;
        sequence: number;
    }[];
    /**
     * Toggle matrix sort column
     */
    toggleMatrixSort(column: 'sequence' | 'name'): void;
    /**
     * Select/deselect a matrix row for highlighting
     */
    selectMatrixRow(testId: string): void;
    /**
     * Handle test name filter input - uses Subject for debounce
     */
    onMatrixFilterInput(event: Event): void;
    /**
     * Clear the matrix test name filter
     */
    clearMatrixFilter(): void;
    getTestResultForRun(runId: string, testId: string): TestResultCell | null;
    getMatrixCellClass(result: TestResultCell | null): string;
    /**
     * Get descriptive tooltip for execution status
     */
    getStatusTooltip(status: string): string;
    /**
     * Get tooltip for human review with rating and optional comments
     */
    getHumanTooltip(rating: number, comments: string | null): string;
    /**
     * Get the count of enabled evaluation types for matrix cell layout
     */
    getEvalCount(): number;
    /**
     * Get count of passed tests for a run
     */
    getRunPassedCount(run: MatrixDataPoint): number;
    /**
     * Get total count of tests for a run
     */
    getRunTotalCount(run: MatrixDataPoint): number;
    /**
     * Get average human rating for a run (only from tests that have ratings)
     */
    getRunHumanAvg(run: MatrixDataPoint): number | null;
    /**
     * Get count of tests with human ratings for a run
     */
    getRunHumanCount(run: MatrixDataPoint): number;
    /**
     * Get average auto score for a run (only from tests that have scores)
     */
    getRunAutoAvg(run: MatrixDataPoint): number | null;
    /**
     * Get count of tests with auto scores for a run
     */
    getRunAutoCount(run: MatrixDataPoint): number;
    /**
     * Navigate to a test run when clicking a matrix cell
     */
    openTestRun(testRunId: string): void;
    /**
     * Handle matrix cell click - navigate to the test run
     */
    onMatrixCellClick(result: TestResultCell | null, event: Event): void;
    /**
     * Renders an interactive heatmap-style chart showing test results across runs
     * with trend lines and better visual hierarchy
     */
    private renderChart;
    /**
     * Renders a legend showing which evaluation types are currently displayed
     */
    private renderChartLegend;
    getAveragePassRate(): number;
    getTotalRuns(): number;
    getAverageDuration(): number;
    getTotalCost(): number;
    getPassRateTrend(): {
        direction: 'up' | 'down' | 'stable';
        value: number;
    };
    formatDuration(seconds: number): string;
    formatCost(cost: number): string;
    selectCompareRunA(run: MJTestSuiteRunEntity): Promise<void>;
    selectCompareRunB(run: MJTestSuiteRunEntity): Promise<void>;
    clearCompareSelection(): void;
    private loadCompareData;
    private buildComparisonResults;
    getComparePassRateDiff(): number | null;
    getCompareDurationDiff(): number | null;
    getAbsCompareDurationDiff(): number;
    getCompareCostDiff(): number | null;
    getCompareImprovedCount(): number;
    getCompareRegressedCount(): number;
    exportToExcel(): Promise<void>;
    private downloadAsCSV;
    getRunTags(run: MJTestSuiteRunEntity): string[];
    /**
     * Export matrix view data to CSV
     */
    exportMatrixToCSV(): void;
    /**
     * Load keyboard shortcuts visibility setting from user settings
     */
    private loadShortcutsSetting;
    /**
     * Toggle analytics filters visibility
     */
    toggleFilters(): void;
    /**
     * Toggle keyboard shortcuts visibility and save preference
     */
    toggleShortcuts(): Promise<void>;
    /** Case-insensitive UUID check whether a run is the currently selected Run A (baseline). */
    IsCompareRunA(run: MJTestSuiteRunEntity): boolean;
    /** Case-insensitive UUID check whether a run is the currently selected Run B (compare). */
    IsCompareRunB(run: MJTestSuiteRunEntity): boolean;
    static ɵfac: i0.ɵɵFactoryDeclaration<MJTestSuiteFormComponentExtended, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MJTestSuiteFormComponentExtended, "mj-test-suite-form", never, {}, {}, never, never, false, never>;
}
/**
 * Analytics data point for charting
 */
interface AnalyticsDataPoint {
    runId: string;
    date: Date;
    passRate: number;
    totalTests: number;
    passedTests: number;
    failedTests: number;
    errorTests: number;
    skippedTests: number;
    duration: number;
    cost: number;
    tags: string[];
    status: string;
}
/**
 * Matrix data point for the matrix view - shows test results across suite runs
 */
interface MatrixDataPoint {
    runId: string;
    date: Date;
    tags: string[];
    status: string;
    passRate: number;
    testResults: Map<string, TestResultCell>;
}
interface TestResultCell {
    testRunId: string;
    testId: string;
    testName: string;
    status: string;
    score: number | null;
    duration: number | null;
    humanRating: number | null;
    humanComments: string | null;
    sequence: number;
}
export {};
//# sourceMappingURL=test-suite-form.component.d.ts.map