import { ReactNode } from 'react'; import { ExecutionStatsData } from '../components/executionStats/types'; import { Header, RestApiStats } from '../components/restApi/types'; import { ConnectionStatus } from '../types'; export type QueryExecutorTabState = { type: 'QUERY_EXECUTOR'; input: string; variables: string; output: string; stats: ExecutionStatsData | null; }; export type MutationExecutorTabState = { type: 'MUTATION_EXECUTOR'; input: string; variables: string; output: string; stats: ExecutionStatsData | null; }; export type RestApiTabState = { type: 'REST_API'; url: string; method: string; headers: Header[]; body: string; response: string; stats: RestApiStats | null; }; export type SseTabState = { type: 'SSE'; url: string; headers: Header[]; events: string; connectionStatus: ConnectionStatus; }; export type RestWebsocketTabState = { type: 'REST_WEBSOCKET'; url: string; messageDraft: string; messages: { id: string; direction: 'sent' | 'received'; data: string; timestamp: number; }[]; connectionStatus: ConnectionStatus; }; export type GqlSubscriptionTabState = { type: 'GQL_SUBSCRIPTION'; wsUrl: string; query: string; variables: string; events: string; connectionStatus: ConnectionStatus; }; export type TabState = QueryExecutorTabState | MutationExecutorTabState | RestApiTabState | SseTabState | RestWebsocketTabState | GqlSubscriptionTabState; type TabStateContextType = { getState: (tabId: string) => T | undefined; setState: (tabId: string, state: T) => void; removeState: (tabId: string) => void; }; export declare const TabStateProvider: ({ children }: { children: ReactNode; }) => import("react/jsx-runtime").JSX.Element; export declare const useTabState: () => TabStateContextType; export {};