/**
 * useStats Hook
 *
 * Manages plugin statistics state and data loading.
 *
 * @since v1.23.0
 */
import { type HealthFactors, type PluginStats, type RecentError, type ServerStats, type SourceStats, type StatsService, type UpdateEvent } from '../../core/stats/index.js';
import type { PluginSourceType } from '../../core/types/index.js';
/**
 * Stats state returned by the hook
 */
export interface StatsState {
    /** Server-wide statistics */
    serverStats: ServerStats;
    /** Per-source statistics */
    sourceStats: SourceStats[];
    /** All plugin statistics */
    pluginStats: PluginStats[];
    /** Recent update events */
    recentUpdates: Array<UpdateEvent & {
        pluginName: string;
    }>;
    /** Recent errors */
    recentErrors: RecentError[];
    /** Health score breakdown */
    healthFactors: HealthFactors;
    /** Whether data is loading */
    loading: boolean;
    /** Error message if any */
    error: string | null;
    /** Reload statistics */
    reload: () => Promise<void>;
    /** Record an update check */
    recordCheck: (pluginName: string, source: PluginSourceType, responseTimeMs?: number) => Promise<void>;
    /** Record an update download */
    recordDownload: (pluginName: string, event: Omit<UpdateEvent, 'date'>) => Promise<void>;
    /** Record an error */
    recordError: (pluginName: string, error: string) => Promise<void>;
    /** Update server stats */
    updateServerStats: (stats: Partial<ServerStats>) => Promise<void>;
}
/**
 * Hook for managing plugin statistics
 */
export declare function useStats(statsService?: StatsService): StatsState;
//# sourceMappingURL=useStats.d.ts.map