import { useMutation } from '@tanstack/react-query'
import { kycCreate, KycResponse } from '@features/kyc/api/kycApi'

export function useKyc() {
  const mutation = useMutation<KycResponse, Error>({ mutationFn: kycCreate })
  return {
    trigger: mutation.mutate,
    data: mutation.data,
    isLoading: mutation.isPending,
    isError: mutation.isError,
  }
}
