import { useQuery } from '@tanstack/react-query'
import { getRuntimeConfig, type RuntimeConfigResponse } from '../../../services/api'

export function usePaymentConfig() {
  return useQuery<RuntimeConfigResponse>({
    queryKey: ['runtimeConfig'],
    queryFn: () => getRuntimeConfig(),
    staleTime: 5000,
    refetchOnWindowFocus: false,
  })
}