import { useQuery } from '@tanstack/react-query'
import { getPaymentConfig } from '../api/paymentApi'
import type { PaymentConfig } from '../api/paymentApi'

export function usePaymentConfig() {
  return useQuery<PaymentConfig>({
    queryKey: ['payment', 'config'],
    queryFn: getPaymentConfig,
    staleTime: 60_000,
  })
}
