/**
 * vinext-supported public modules whose declarations cannot be vendored
 * directly from the installed Next.js package, plus vinext-specific extensions.
 * The primary shared surface is generated by scripts/sync-next-types.mjs instead.
 */
// oxlint-disable-next-line typescript/triple-slash-reference
/// <reference path="./next-shims-missing-modules-vinext.d.ts" />

// Next.js publishes this entrypoint with an unresolved type-only import from
// its private, compiled copy of web-vitals. Keep the public function signature
// here so consuming projects do not need either next or web-vitals installed.
declare module "next/web-vitals" {
  export function useReportWebVitals(
    reportWebVitalsFn: (metric: {
      name: "CLS" | "FCP" | "FID" | "INP" | "LCP" | "TTFB";
      value: number;
      rating: "good" | "needs-improvement" | "poor";
      delta: number;
      id: string;
      entries: PerformanceEntry[];
      navigationType:
        | "navigate"
        | "reload"
        | "back-forward"
        | "back-forward-cache"
        | "prerender"
        | "restore";
    }) => void,
  ): void;
}

declare module "next/navigation" {
  export function useRouter(): import("@vinext/types/next/upstream/dist/shared/lib/app-router-context.shared-runtime").AppRouterInstance & {
    bfcacheId: string;
  };
}
