import ApiService from "@/services/ApiService";

const base = "admin/areas";

export const list = async () => {
  const res = await ApiService.get(base);
  return res.data;
};

export const create = async (payload) => {
  const res = await ApiService.post(base, payload);
  return res.data;
};

export const update = async (id, payload) => {
  const res = await ApiService.put(`${base}/${id}`, payload);
  return res.data;
};

export const disable = async (id) => {
  const res = await ApiService.patch(`${base}/${id}/disable`);
  return res.data;
};
