import { useMemo } from "react";
import type { MarkerEntry } from "@/types";
import { layoutBookmarkRail, type BookmarkRailItem } from "@/utils/bookmarkRailLayout";

export function useBookmarkRailLayout(markers: MarkerEntry[]): BookmarkRailItem[] {
  return useMemo(() => layoutBookmarkRail(markers), [markers]);
}
