import { OnInit, ChangeDetectorRef } from '@angular/core';
import * as i0 from "@angular/core";
/** Time bucket for aggregation */
interface TimeBucket {
    label: string;
    date: Date;
    requests: number;
    errors: number;
    avgResponseTime: number;
}
/** Endpoint stats */
interface EndpointStats {
    endpoint: string;
    method: string;
    requests: number;
    avgResponseTime: number;
    errorRate: number;
}
/** Key stats */
interface KeyStats {
    keyId: string;
    label: string;
    requests: number;
    lastUsed: Date | null;
}
/** Status code group */
interface StatusGroup {
    label: string;
    code: string;
    count: number;
    percentage: number;
    color: string;
}
/** Usage log item for display */
interface UsageLogItem {
    id: string;
    timestamp: Date;
    endpoint: string;
    method: string;
    statusCode: number;
    responseTime: number;
    keyLabel: string;
    keyId: string;
}
/**
 * API Usage Analytics Panel Component
 * Comprehensive usage statistics and drill-down capabilities
 */
export declare class APIUsagePanelComponent implements OnInit {
    private md;
    private cdr;
    IsLoading: boolean;
    IsLoadingLogs: boolean;
    TimeRange: 'day' | 'week' | 'month' | 'all';
    TotalRequests: number;
    TotalErrors: number;
    AvgResponseTime: number;
    SuccessRate: number;
    UniqueKeys: number;
    UniqueEndpoints: number;
    RequestsTrend: number;
    ErrorsTrend: number;
    ResponseTimeTrend: number;
    TimeBuckets: TimeBucket[];
    MaxRequests: number;
    MaxErrors: number;
    TopEndpoints: EndpointStats[];
    TopKeys: KeyStats[];
    StatusGroups: StatusGroup[];
    RecentLogs: UsageLogItem[];
    ShowLogsPanel: boolean;
    LogsFilter: {
        endpoint?: string;
        keyId?: string;
    };
    KeyMap: Map<string, string>;
    Math: Math;
    constructor(cdr: ChangeDetectorRef);
    ngOnInit(): Promise<void>;
    /**
     * Load all usage data
     */
    loadData(): Promise<void>;
    /**
     * Load API keys for label lookup
     */
    private loadKeys;
    /**
     * Load usage statistics based on time range
     */
    private loadUsageStats;
    /**
     * Get time filter for RunView based on selected range
     */
    private getTimeFilter;
    /**
     * Calculate summary KPIs
     */
    private calculateSummaryKPIs;
    /**
     * Build time buckets for chart
     */
    private buildTimeBuckets;
    /**
     * Format bucket label based on time range
     */
    private formatBucketLabel;
    /**
     * Build endpoint statistics
     */
    private buildEndpointStats;
    /**
     * Build key statistics
     */
    private buildKeyStats;
    /**
     * Build status code groups
     */
    private buildStatusGroups;
    /**
     * Map log entity to display item
     */
    private mapLogToItem;
    /**
     * Change time range and reload
     */
    setTimeRange(range: 'day' | 'week' | 'month' | 'all'): Promise<void>;
    /**
     * Get bar height percentage for chart
     */
    getBarHeight(value: number): number;
    /**
     * Get error bar height for chart
     */
    getErrorBarHeight(bucket: TimeBucket): number;
    /**
     * Drill down into endpoint
     */
    drillDownEndpoint(endpoint: EndpointStats): void;
    /**
     * Drill down into key
     */
    drillDownKey(key: KeyStats): void;
    /**
     * Load filtered logs for drill-down
     */
    private loadFilteredLogs;
    /**
     * Close logs panel
     */
    closeLogsPanel(): void;
    /**
     * Get status class for HTTP status code
     */
    getStatusClass(statusCode: number): string;
    /**
     * Get method badge class
     */
    getMethodClass(method: string): string;
    /**
     * Format date for display
     */
    formatDate(date: Date | null): string;
    /**
     * Format number with K/M suffix
     */
    formatNumber(num: number): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<APIUsagePanelComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<APIUsagePanelComponent, "mj-api-usage-panel", never, {}, {}, never, never, false, never>;
}
export {};
//# sourceMappingURL=api-usage-panel.component.d.ts.map