/**
 * Priority Queue Implementation
 *
 * Extends the basic queue with priority-based ordering.
 * Items with higher priority are processed first.
 */
import { Queue, QueueItem, QueueOptions } from './queue';
export type PriorityLevel = 'low' | 'normal' | 'high' | 'critical';
export interface PriorityItem<T> extends QueueItem<T> {
    priority: PriorityLevel;
    priorityValue: number;
}
export interface PriorityQueueOptions extends QueueOptions {
    /** Default priority for new items */
    defaultPriority?: PriorityLevel;
    /** Whether to use fair scheduling (prevents starvation) */
    fairScheduling?: boolean;
    /** Maximum time an item can wait before priority boost (ms) */
    maxWaitTime?: number;
}
/**
 * Priority Queue
 */
export declare class PriorityQueue<T = unknown> extends Queue<T> {
    protected items: PriorityItem<T>[];
    protected priorityOptions: Required<PriorityQueueOptions>;
    constructor(options?: PriorityQueueOptions);
    /**
     * Add an item with priority
     */
    enqueuePriority(data: T, priority?: PriorityLevel, metadata?: Record<string, unknown>): PriorityItem<T> | null;
    /**
     * Override enqueue to use priority
     */
    enqueue(data: T, metadata?: Record<string, unknown>): PriorityItem<T> | null;
    /**
     * Insert item in correct position based on priority
     */
    protected insertByPriority(item: PriorityItem<T>): void;
    /**
     * Apply fair scheduling to prevent starvation
     */
    protected applyFairScheduling(): void;
    /**
     * Get items by priority level
     */
    getByPriority(priority: PriorityLevel): PriorityItem<T>[];
    /**
     * Count items by priority level
     */
    countByPriority(): Record<PriorityLevel, number>;
    /**
     * Update item priority
     */
    updatePriority(id: string, priority: PriorityLevel): boolean;
    /**
     * Escalate item to higher priority
     */
    escalate(id: string): boolean;
    /**
     * De-escalate item to lower priority
     */
    deescalate(id: string): boolean;
    /**
     * Get highest priority item
     */
    peekHighest(): PriorityItem<T> | undefined;
    /**
     * Get lowest priority item
     */
    peekLowest(): PriorityItem<T> | undefined;
    /**
     * Dequeue only items with specific priority or higher
     */
    dequeueWithMinPriority(minPriority: PriorityLevel): PriorityItem<T> | undefined;
    /**
     * Clear all items of a specific priority
     */
    clearPriority(priority: PriorityLevel): number;
    /**
     * Get all items sorted by priority (highest first)
     */
    getAll(): PriorityItem<T>[];
    /**
     * Get priority queue specific stats
     */
    getPriorityStats(): {
        size: number;
        byPriority: Record<PriorityLevel, number>;
        highestPriority: PriorityLevel | null;
        lowestPriority: PriorityLevel | null;
    };
    /**
     * Format priority queue status for display
     */
    formatStatus(): string;
}
/**
 * Create a priority queue with custom settings
 */
export declare function createPriorityQueue<T>(options?: PriorityQueueOptions): PriorityQueue<T>;
export default PriorityQueue;
