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

export const cameraQueries = {
  instance: () =>
    queryOptions({
      queryKey: queryKeys.settings.cameraInstance(),
      queryFn: getInstanceV1,
      staleTime: 60 * 60 * 1000,
      gcTime: Number.POSITIVE_INFINITY,
    }),

  composeSettings: () =>
    queryOptions({
      queryKey: queryKeys.settings.compose(),
      queryFn: getComposeSettings,
      staleTime: 60 * 60 * 1000,
      gcTime: Number.POSITIVE_INFINITY,
    }),
}
