import { F as FixCzechOptions } from '../fixCzech-CCow6rWW.cjs';
import { NextResponse } from 'next/server';

/**
 * Build a Next.js middleware that pipes every HTML response through
 * {@link createFixCzechStream}. Streaming-friendly – the response body
 * is not buffered, which keeps Suspense and RSC payload behaviour
 * intact.
 *
 * Usage in `middleware.ts`:
 *
 * ```ts
 * import { withCzTypography } from 'cz-typography/next/middleware';
 *
 * export const middleware = withCzTypography();
 *
 * export const config = {
 *     matcher: '/((?!api|_next/static|_next/image|favicon.ico).*)',
 * };
 * ```
 *
 * @param {WithCzTypographyOptions} [config]
 */
declare function withCzTypography(config?: WithCzTypographyOptions): (request: any) => Promise<NextResponse<unknown>>;

type WithCzTypographyOptions = {
    /**
     * Rule toggles.
     */
    options?: FixCzechOptions;
    /**
     * Custom predicate – return false to skip.
     */
    shouldProcess?: (request: any) => boolean;
    /**
     * Content-Type substrings that trigger transformation.
     */
    contentTypes?: string[];
};

// @ts-ignore
export = withCzTypography;
export { type WithCzTypographyOptions, withCzTypography };
