import { queryOptions } from '@tanstack/react-query'
import { getOpenServers, getRegisterServers } from 'src/lib/api'
import { queryKeys } from './keys'

export const authQueries = {
  openServers: () =>
    queryOptions({
      queryKey: queryKeys.auth.openServers(),
      queryFn: getOpenServers,
      staleTime: 10 * 60 * 1000,
      gcTime: 60 * 60 * 1000,
    }),

  registerServers: () =>
    queryOptions({
      queryKey: queryKeys.auth.registerServers(),
      queryFn: getRegisterServers,
      staleTime: 10 * 60 * 1000,
      gcTime: 60 * 60 * 1000,
    }),
}
