import { OnInit, OnDestroy } from '@angular/core';
import { MJTestEntity, MJTestRunEntity, MJTestSuiteTestEntity, MJTestRunFeedbackEntity } from '@memberjunction/core-entities';
import { MJTestFormComponent } from '../../generated/Entities/MJTest/mjtest.form.component';
import { EvaluationPreferences } from '@memberjunction/ng-testing';
import { ToolbarConfig } from '@memberjunction/ng-code-editor';
import * as i0 from "@angular/core";
interface HistoryDataPoint {
    date: Date;
    passRate: number;
    avgScore: number;
    avgDuration: number;
    avgCost: number;
    runCount: number;
    passCount: number;
    failCount: number;
}
interface SuitePerformance {
    suiteId: string;
    suiteName: string;
    totalRuns: number;
    passedRuns: number;
    failedRuns: number;
    passRate: number;
    avgScore: number;
    avgDuration: number;
    avgCost: number;
    lastRun: Date | null;
    tags: string[];
}
interface ParsedJSON {
    inputDefinition?: Record<string, unknown>;
    expectedOutcomes?: Record<string, unknown>;
    configuration?: Record<string, unknown>;
    tags?: string[];
}
export declare class MJTestFormComponentExtended extends MJTestFormComponent implements OnInit, OnDestroy {
    record: MJTestEntity;
    private destroy$;
    activeTab: string;
    loading: boolean;
    loadingRuns: boolean;
    loadingSuites: boolean;
    error: string | null;
    testRunsLoaded: boolean;
    suiteTestsLoaded: boolean;
    isRefreshing: boolean;
    testRuns: MJTestRunEntity[];
    suiteTests: MJTestSuiteTestEntity[];
    feedbackMap: Map<string, MJTestRunFeedbackEntity>;
    historyLoaded: boolean;
    loadingHistory: boolean;
    historyTimeRange: '7d' | '30d' | '90d' | 'all';
    historyData: HistoryDataPoint[];
    suitePerformance: SuitePerformance[];
    uniqueTags: string[];
    selectedTagFilter: string | null;
    parsedData: ParsedJSON;
    activeJsonView: 'input' | 'expected' | 'config' | 'tags';
    jsonToolbar: ToolbarConfig;
    keyboardShortcutsEnabled: boolean;
    showShortcuts: boolean;
    private shortcutsSettingEntity;
    private metadata;
    evalPreferences: EvaluationPreferences;
    private navigationService;
    private testingDialogService;
    private evalPrefsService;
    private viewContainerRef;
    private appManager;
    ngOnInit(): Promise<void>;
    ngOnDestroy(): void;
    handleKeyboardShortcut(event: KeyboardEvent): void;
    private loadTestRuns;
    /**
     * Load feedbacks for a batch of test run IDs
     */
    private loadFeedbacksForTestRuns;
    /**
     * Get feedback for a specific test run
     */
    getFeedbackForRun(testRunId: string): MJTestRunFeedbackEntity | undefined;
    /**
     * Get tooltip for status indicator
     */
    getStatusTooltip(status: string): string;
    /**
     * Get tooltip for human review with rating and optional comments
     */
    getHumanTooltip(rating: number, comments: string | null): string;
    private loadSuiteTests;
    private parseJsonFields;
    changeTab(tab: string): void;
    setJsonView(view: 'input' | 'expected' | 'config' | 'tags'): void;
    getStatusColor(): string;
    getStatusIcon(): string;
    getStatusClass(): string;
    getRunStatusColor(status: string): string;
    getPassRate(): number;
    getAverageCost(): number;
    getAverageDuration(): number;
    formatDuration(seconds: number): string;
    formatCost(cost: number): string;
    formatTimeout(ms: number | null): string;
    openTestRun(runId: string): void;
    getRunTags(run: MJTestRunEntity): string[];
    openTestSuite(suiteId: string): void;
    navigateToTestingDashboard(): void;
    runTest(): Promise<void>;
    refresh(): Promise<void>;
    getJsonData(): string;
    getRelativeTime(date: Date | string | null): string;
    loadHistory(): Promise<void>;
    private buildHistoryData;
    private filterRunsByTimeRange;
    private buildSuitePerformance;
    setHistoryTimeRange(range: '7d' | '30d' | '90d' | 'all'): void;
    setTagFilter(tag: string | null): void;
    getFilteredHistoryData(): HistoryDataPoint[];
    getOverallPassRate(): number;
    getOverallAvgScore(): number;
    getOverallAvgDuration(): number;
    getOverallAvgCost(): number;
    getTotalRuns(): number;
    getPassRateTrend(): 'up' | 'down' | 'stable';
    exportHistoryToCSV(): void;
    openSuiteFromHistory(suiteId: string): void;
    /**
     * Load keyboard shortcuts visibility setting from user settings
     */
    private loadShortcutsSetting;
    /**
     * Toggle keyboard shortcuts visibility and save preference
     */
    toggleShortcuts(): Promise<void>;
    static ɵfac: i0.ɵɵFactoryDeclaration<MJTestFormComponentExtended, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<MJTestFormComponentExtended, "mj-test-form", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=test-form.component.d.ts.map