/** Next.js optionally supports storing all sources under the `src` directory */
export declare const SRC_DIR_NAME = "src";
/**
 * Checks if the current project is a Next.js project.
 *
 * It determines this by checking if the `tsconfig.json` file exists, or
 * if the `package.json` file contains a `typescript` dev dependency.
 */
export declare function checkIsInNextJsProject(): Promise<boolean>;
/**
 * Check if the current project is using the app or page router.
 * Prioritizes the app router (more modern) if both are present.
 */
export declare function checkIfUsingAppOrPagesRouter(): Promise<"app" | "pages" | null>;
/**
 * Next.js 15's CLI introduced the option to store all sources under the `src` directory.
 * This checks if the current project is using the `src` directory.
 */
export declare const checkIfNextJsProjectUsesSrcDirectory: () => boolean;
export declare const getNextJsSourceDirectoryPrefix: () => "" | "src/";
/**
 * Checks if the current Next.js project has a custom root layout (app router)
 * or custom app (pages router).
 *
 * @see https://nextjs.org/docs/pages/building-your-application/routing/custom-app
 * @see https://nextjs.org/docs/app/api-reference/file-conventions/layout#root-layouts
 */
export declare function checkIfNextJsCustomAppOrRootLayoutExists(): Promise<boolean>;
/**
 * Adds the 'use client' directive to the source code if the project is a Next.js project.
 */
export declare const withNextJsUseClientDirective: (source: string, isNextJs: boolean) => string;
/** Strips the `src/` prefix from import paths. */
export declare const stripSrcPrefixFromPath: (path: string) => string;
/** Resolves the import path from root layout (or custom app) to components */
export declare const getImportPathForRootLayout: (componentPath: string, pathName: string) => string;
export declare function generateNextJsDemoFiles({ hasNextJsCustomAppOrRootLayout, reactComponentPath, componentExtension: extension, }: {
    hasNextJsCustomAppOrRootLayout: boolean;
    reactComponentPath: string;
    componentExtension: string;
}): Promise<void>;
