import api from "src/api";

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

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

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

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