import { useRouteLoaderData } from "react-router";

export interface RequestInfo {
  hints: {
    theme: "light" | "dark" | null;
    timeZone: string | null;
  } & Record<string, string>;
  userPrefs: {
    theme?: "light" | "dark";
  };
}
export function useRequestInfo() {
  const data = useRouteLoaderData("root") as { requestInfo: RequestInfo };
  return data?.requestInfo;
}
