import { LitElement } from './plugins.js';
import type { CSSResult, TemplateResult } from './plugins.js';
export interface ITypedRequestLogEntry {
    correlationId: string;
    method: string;
    direction: 'outgoing' | 'incoming';
    phase: 'request' | 'response';
    timestamp: number;
    durationMs?: number;
    payload: any;
    error?: string;
}
export interface ITypedRequestStats {
    totalRequests: number;
    totalResponses: number;
    methodCounts: Record<string, {
        requests: number;
        responses: number;
        errors: number;
        avgDurationMs: number;
    }>;
    errorCount: number;
    avgDurationMs: number;
}
/**
 * Grouped request/response pair by correlationId
 */
export interface IGroupedRequest {
    correlationId: string;
    method: string;
    request?: ITypedRequestLogEntry;
    response?: ITypedRequestLogEntry;
    timestamp: number;
    durationMs?: number;
    hasError: boolean;
}
type TRequestFilter = 'all' | 'outgoing' | 'incoming';
type TPhaseFilter = 'all' | 'request' | 'response';
/**
 * TypedRequest traffic monitoring panel for sw-dash
 *
 * Receives logs, stats, and methods via properties from parent (sw-dash-app).
 * Filtering is done locally.
 * Load more and clear operations dispatch events to parent.
 */
export declare class SwDashRequests extends LitElement {
    static styles: CSSResult[];
    accessor logs: ITypedRequestLogEntry[];
    accessor totalCount: number;
    accessor stats: ITypedRequestStats | null;
    accessor methods: string[];
    accessor directionFilter: TRequestFilter;
    accessor phaseFilter: TPhaseFilter;
    accessor methodFilter: string;
    accessor searchText: string;
    accessor isLoadingMore: boolean;
    accessor modalOpen: boolean;
    accessor selectedGroup: IGroupedRequest | null;
    private handleDirectionFilterChange;
    private handlePhaseFilterChange;
    private handleMethodFilterChange;
    private setMethodFilter;
    private handleSearch;
    private handleClear;
    private loadMore;
    private openPayloadModal;
    private handleContextMenu;
    private closeModal;
    private handleModalOverlayClick;
    private handleKeydown;
    connectedCallback(): void;
    disconnectedCallback(): void;
    private formatTimestamp;
    private getDurationClass;
    private formatDuration;
    /**
     * Filter logs locally based on direction, phase, method, and search text
     */
    private getFilteredLogs;
    /**
     * Group filtered logs by correlationId to show request/response pairs together
     */
    private getGroupedLogs;
    /**
     * Render the payload modal
     */
    private renderModal;
    render(): TemplateResult;
}
export {};
