import { getActiveOpenDayEvent, getOpenDayClasses } from "@/lib/db";
import type { OpenDayEvent, OpenDayClass } from "@/lib/db";

export type { OpenDayEvent, OpenDayClass };

export function getActiveOpenDay(): { event: OpenDayEvent; classes: OpenDayClass[] } | null {
  const event = getActiveOpenDayEvent();
  if (!event) return null;
  const classes = getOpenDayClasses(event.id);
  return { event, classes };
}
