import api from "src/api";

export const getSupportTickets = async () => {
  const { data } = await api.get("/franchisee/support/tickets");
  return data.payload;
};

export const createSupportTicket = async (payload) => {
  const { data } = await api.post("/franchisee/support/tickets", payload);
  return data.payload;
};

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

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