/**
 * usePerformance Hook
 *
 * Hook for managing performance metrics state and updates.
 *
 * @since v1.70.1
 */
import { type AggregatedMetrics, type PerformanceBaseline, type PerformanceMetrics } from '../../core/analytics/index.js';
import type { TimeRange as ChartTimeRange } from '../components/analytics/chart-utils.js';
/**
 * Performance data state
 */
export interface PerformanceState {
    /** Current/latest metrics */
    current: PerformanceMetrics | null;
    /** Historical metrics for the selected time range */
    history: PerformanceMetrics[];
    /** Aggregated metrics */
    aggregated: AggregatedMetrics | null;
    /** Active baseline for comparison */
    baseline: PerformanceBaseline | null;
    /** Available baselines */
    baselines: PerformanceBaseline[];
    /** Selected time range */
    timeRange: ChartTimeRange;
    /** Loading state */
    loading: boolean;
    /** Error message */
    error: string | null;
    /** Health score */
    healthScore: number;
    /** Last update timestamp */
    lastUpdate: number;
}
/**
 * Performance hook return type
 */
export interface UsePerformanceReturn extends PerformanceState {
    /** Refresh metrics */
    refresh: () => void;
    /** Change time range */
    setTimeRange: (range: ChartTimeRange) => void;
    /** Set active baseline */
    setBaseline: (baselineId: string | null) => void;
    /** Create new baseline from current data */
    createBaseline: (name: string, description?: string) => PerformanceBaseline | null;
    /** Clear all metrics */
    clearMetrics: () => void;
}
/**
 * Hook options
 */
export interface UsePerformanceOptions {
    /** Server ID to track */
    serverId?: string;
    /** Auto-refresh interval in ms (0 to disable) */
    autoRefreshInterval?: number;
    /** Initial time range */
    initialTimeRange?: ChartTimeRange;
}
/**
 * usePerformance hook
 */
export declare function usePerformance(options?: UsePerformanceOptions): UsePerformanceReturn;
export default usePerformance;
//# sourceMappingURL=usePerformance.d.ts.map