import * as next_server from 'next/server';
import { NextRequest, NextFetchEvent } from 'next/server';
import { NodeOptions } from '@highlight-run/node';
export { H } from '@highlight-run/node';
import { IncomingHttpHeaders } from 'http';
import { H as HighlightEnv, E as EdgeHandler, a as ExtendedExecutionContext } from './with-highlight-edge-23c1ab0e.js';
import '@cloudflare/workers-types';

declare type HasHeaders = {
    headers: IncomingHttpHeaders;
};
declare type HasStatus = {
    statusCode: number;
    statusMessage: string;
};
declare type ApiHandler<T extends HasHeaders, S extends HasStatus> = (req: T, res: S) => unknown | Promise<unknown>;
declare const Highlight$1: (options: NodeOptions) => <T extends HasHeaders, S extends HasStatus>(origHandler: ApiHandler<T, S>) => ApiHandler<T, S>;

declare function registerHighlight(nodeOptions: NodeOptions): Promise<void>;

type PageRouterHighlightHandler = ReturnType<typeof Highlight$1>;
declare const Highlight: typeof PageRouterHighlight;
declare function PageRouterHighlight(env: HighlightEnv): PageRouterHighlightHandler;
declare function AppRouterHighlight(env: HighlightEnv): (originalHandler: (request: NextRequest, context: {
    params: Record<string, string>;
}) => Promise<Response | next_server.NextResponse<unknown>>) => (request: NextRequest, context: {
    params: Record<string, string>;
}) => Promise<Response | next_server.NextResponse<unknown>>;
declare function EdgeHighlight(_: HighlightEnv): (handler: EdgeHandler) => (request: NextRequest, event: NextFetchEvent & ExtendedExecutionContext) => Promise<Response>;

export { AppRouterHighlight, EdgeHighlight, Highlight, HighlightEnv, PageRouterHighlight, registerHighlight };
