import { NextConfig } from 'next';

type TransformKeys = 'assetPrefix' | 'buildId' | 'draftMode' | 'redirects' | 'rewrites' | 'webpack';

interface WithMicrofrontendsOptions {
    /**
     * Explicitly set the name of the application instead of using the name from the package.json.
     */
    appName?: string;
    isProduction?: () => boolean;
    debug?: boolean;
    skipTransforms?: TransformKeys[];
    /**
     * True to enable support for Next.js pages router. This is disabled by
     * default since it modifies Webpack chunking behavior, so it should only be
     * enabled when necessary.
     */
    supportPagesRouter?: boolean;
    configPath?: string;
}

/**
 * A function that wraps the next.config.js file to automatically configure zones
 * based on the microfrontends configuration.
 */
declare function withMicrofrontends(nextConfig: NextConfig, opts?: WithMicrofrontendsOptions): NextConfig;

export { withMicrofrontends };
