/**
 * @fileoverview Error Analysis -- Basic.
 *
 * Displays error summary cards, and errors grouped by source (Prompt+Model combination).
 * Each group can be expanded to show individual error details.
 * Data loaded from MJ: AI Prompt Runs where Success=false.
 */
import { OnInit, OnDestroy } from '@angular/core';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import { GlobalFilterState } from '../../../interfaces/analytics-preferences.interface';
import * as i0 from "@angular/core";
interface ErrorSummary {
    TotalErrors: number;
    ErrorRate: number;
    MostCommonError: string;
}
interface ErrorGroup {
    Source: string;
    PromptName: string;
    ModelName: string;
    Count: number;
    LastErrorMessage: string;
    LastErrorTime: string;
    IsExpanded: boolean;
    Errors: ErrorDetail[];
}
interface ErrorDetail {
    ID: string;
    Time: string;
    ErrorMessage: string;
    Duration: string;
}
export declare class AnalyticsErrorAnalysisComponent extends BaseAngularComponent implements OnInit, OnDestroy {
    private _timeRange;
    set TimeRange(value: string);
    get TimeRange(): string;
    private _filters;
    set Filters(value: GlobalFilterState);
    get Filters(): GlobalFilterState;
    private shallowFiltersEqual;
    private cdr;
    private destroy$;
    private initialized;
    IsLoading: boolean;
    Summary: ErrorSummary;
    ErrorGroups: ErrorGroup[];
    private failedRuns;
    private totalRunCount;
    ngOnInit(): void;
    ngOnDestroy(): void;
    OnTimeRangeChange(range: string): void;
    OnFiltersChange(filters: GlobalFilterState): void;
    /** Accordion-driven handler — SETS the emitted expanded value (vs. a flip),
     *  preserving the detectChanges() side-effect and keeping IsExpanded in sync
     *  so the collapsed-only "last error" preview shows/hides correctly. */
    onGroupExpandedChange(group: ErrorGroup, expanded: boolean): void;
    private LoadData;
    private computeSummary;
    private buildErrorGroups;
    private buildDateFilter;
    private buildExtraFilters;
    private normalizeErrorMessage;
    private truncateMessage;
    private formatRelativeTime;
    private formatDateTime;
    static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsErrorAnalysisComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<AnalyticsErrorAnalysisComponent, "app-analytics-error-analysis", never, { "TimeRange": { "alias": "TimeRange"; "required": false; }; "Filters": { "alias": "Filters"; "required": false; }; }, {}, never, never, false, never>;
}
export declare function LoadAnalyticsErrorAnalysis(): void;
export {};
//# sourceMappingURL=error-analysis.component.d.ts.map