import { queryOptions } from "@tanstack/react-query";
import {
  fetchFeaturedEvents,
  fetchAllEvents,
  fetchAllEventsAdmin,
  type EventRow,
} from "./events.functions";

export const featuredEventsQO = queryOptions<EventRow[]>({
  queryKey: ["events", "featured"],
  queryFn: () => fetchFeaturedEvents(),
});

export const allEventsQO = queryOptions<EventRow[]>({
  queryKey: ["events", "all"],
  queryFn: () => fetchAllEvents(),
});

export const adminEventsQO = queryOptions<EventRow[]>({
  queryKey: ["events", "admin"],
  queryFn: () => fetchAllEventsAdmin(),
});
