import { createNavigation } from "next-intl/navigation";

import { routing } from "./routing";

// Locale-aware navigation wrappers. `usePathname` returns the path WITHOUT the locale
// prefix, and `useRouter().replace(path, { locale })` switches locale correctly for the
// `as-needed` prefix strategy — which manual string-munging of next/navigation does not.
export const { Link, redirect, usePathname, useRouter, getPathname } =
  createNavigation(routing);
