export function buildAuthCallbackUrl(nextPath = "/") {
  if (typeof window === "undefined") return "/auth/callback";

  const url = new URL("/auth/callback", window.location.origin);
  if (nextPath.startsWith("/")) {
    url.searchParams.set("next", nextPath);
  }
  return url.toString();
}

export function buildPasswordRecoveryUrl() {
  if (typeof window === "undefined") return "/reset-password";
  return new URL("/reset-password", window.location.origin).toString();
}
