/**
 * Alert Engine
 *
 * Performance alert monitoring and notification system.
 *
 * @since v1.70.3
 */
import type { AlertTrigger, PerformanceAlert, PerformanceMetrics } from './analytics-types.js';
/**
 * Alert engine options
 */
export interface AlertEngineOptions {
    /** Custom alerts to add to defaults */
    customAlerts?: PerformanceAlert[];
    /** Replace defaults with custom alerts only */
    replaceDefaults?: boolean;
    /** Callback when alert triggers */
    onTrigger?: (trigger: AlertTrigger) => void;
}
/**
 * Alert evaluation result
 */
export interface AlertEvaluationResult {
    /** Alert that was evaluated */
    alert: PerformanceAlert;
    /** Whether condition is met */
    conditionMet: boolean;
    /** Current value */
    currentValue: number;
    /** Threshold value */
    thresholdValue: number;
    /** Time condition has been met (ms) */
    durationMet: number;
}
/**
 * Alert state for tracking duration-based alerts
 */
interface AlertState {
    alertId: string;
    conditionMetSince: number | null;
    lastTriggered: number;
    triggerCount: number;
}
/**
 * Alert Engine
 */
export declare class AlertEngine {
    private alerts;
    private alertStates;
    private triggerHistory;
    private onTrigger?;
    private maxHistorySize;
    constructor(options?: AlertEngineOptions);
    /**
     * Add or update an alert
     */
    addAlert(alert: PerformanceAlert): void;
    /**
     * Remove an alert
     */
    removeAlert(alertId: string): boolean;
    /**
     * Get all alerts
     */
    getAlerts(): PerformanceAlert[];
    /**
     * Get alert by ID
     */
    getAlert(alertId: string): PerformanceAlert | undefined;
    /**
     * Enable or disable an alert
     */
    setAlertEnabled(alertId: string, enabled: boolean): boolean;
    /**
     * Evaluate metrics against all alerts
     */
    evaluate(metrics: PerformanceMetrics): AlertTrigger[];
    /**
     * Evaluate a single alert
     */
    evaluateAlert(alert: PerformanceAlert, metrics: PerformanceMetrics): AlertEvaluationResult;
    /**
     * Get metric value from metrics object
     */
    private getMetricValue;
    /**
     * Create alert trigger
     */
    private createTrigger;
    /**
     * Add trigger to history
     */
    private addToHistory;
    /**
     * Get trigger history
     */
    getTriggerHistory(limit?: number): AlertTrigger[];
    /**
     * Get alert state
     */
    getAlertState(alertId: string): AlertState | undefined;
    /**
     * Clear trigger history
     */
    clearHistory(): void;
    /**
     * Reset alert states
     */
    resetStates(): void;
    /**
     * Get summary of current alert status
     */
    getSummary(): {
        total: number;
        enabled: number;
        disabled: number;
        triggered: number;
        recentTriggers: number;
    };
}
/**
 * Create alert engine instance
 */
export declare function createAlertEngine(options?: AlertEngineOptions): AlertEngine;
/**
 * Get alert engine singleton
 */
export declare function getAlertEngine(): AlertEngine;
/**
 * Reset alert engine singleton
 */
export declare function resetAlertEngine(): void;
export {};
//# sourceMappingURL=alert-engine.d.ts.map