export const getCurrentLocale = (): string | undefined => {
  if (typeof window !== "undefined" && typeof document !== "undefined") {
    const match = document.cookie
        .split("; ")
        .find(row => row.startsWith("NEXT_LOCALE="));
    return match?.split("=")[1];
  }
  return undefined;
};
