"use client";

import { useQuery } from "@tanstack/react-query";
import { hospitalityApi } from "@/modules/hospitality/services/hospitality-api";
import { useTenantId } from "@/hooks/useTenantId";

export function useHospitalityVenues() {
  const { tenantId } = useTenantId();
  return useQuery({
    queryKey: ["hospitality", tenantId, "venues-options"],
    queryFn: () => hospitalityApi.venues.list(tenantId!, { page: 1, page_size: 500 }),
    enabled: !!tenantId,
    staleTime: 60_000,
  });
}
