/**
 * Session ID utility for custom POI auth.
 * Stored in localStorage under "session_id" key.
 * Returns empty string during SSR (window not available).
 */
export function getOrCreateSessionId(): string {
  if (typeof window === "undefined") return "";
  let id = localStorage.getItem("session_id");
  if (!id) {
    id = crypto.randomUUID();
    localStorage.setItem("session_id", id);
  }
  return id;
}
