import api from "src/api";

export const getProviderBankAccounts = async () => {
  const { data } = await api.get("/provider/bank-accounts");
  return data.payload ?? [];
};

export const createProviderBankAccount = async (bankAccount) => {
  const { data } = await api.post("/provider/bank-accounts", bankAccount);
  return data.payload;
};

export const updateProviderBankAccount = async (id, bankAccount) => {
  const { data } = await api.put(`/provider/bank-accounts/${id}`, bankAccount);
  return data.payload;
};

export const deleteProviderBankAccount = async (id) => {
  const { data } = await api.delete(`/provider/bank-accounts/${id}`);
  return data.payload;
};
