import { useMutation } from '@tanstack/react-query';
import type { TCancelRequest, TCancelResponse } from '../types/types';
import fakturApi from '../utils/api';

const useCancelDokumenLainMasukan = (props?: any) =>
  useMutation<TCancelResponse, Error, TCancelRequest>({
    mutationKey: ['cancel-dokumen-lain-masukan'],
    mutationFn: (payload) => fakturApi.cancelDokumenLainMasukan(payload),
    ...props,
  });

export default useCancelDokumenLainMasukan;
