import { createAsyncThunk } from "@reduxjs/toolkit";
import axios from "axios";

export const provincePaymentRefIdService = createAsyncThunk(
  "PROVINCE_PAYMENT_REF_ID",
  async (d, { dispatch }) => {
    const { data, status } = await axios.post("wage-payment-total/", d);
    return { data, status };
  }
);

export const provincePaymentRefIdWagesService = createAsyncThunk(
  "PROVINCE_PAYMENT_REF_ID_WAGES",
  async (d, { dispatch }) => {
    const { data, status } = await axios.post(
      `https://${d.backend}backend.rasadyar.com/wage-payment-with-link/`,
      d.data
    );
    return { data, status };
  }
);
