import api from "src/api";

export const getSupportReplies = async (ticketId) => {
  const { data } = await api.get(`/support-ticket/${ticketId}/replies`);
  return data.payload;
};

export const createSupportReply = async (ticketId, payload) => {
  const { data } = await api.post(`/support-ticket/${ticketId}/replies`, payload);
  return data.payload;
};

export const updateSupportReply = async (ticketId, id, payload) => {
  const { data } = await api.put(`/support-ticket/${ticketId}/replies/${id}`, payload);
  return data.payload;
};

export const deleteSupportReply = async (ticketId, id) => {
  const { data } = await api.delete(`/support-ticket/${ticketId}/replies/${id}`);
  return data;
};
