import api from "src/api";

export const getInhabitantClassificationsForSelect = async () => {
  const { data } = await api.get("/selects/inhabitant-classifications");
  return data.payload;
};

//

export const getInhabitantClassifications = async () => {
  const { data } = await api.get("/inhabitant-classification");
  return data.payload;
};

export const createInhabitantClassification = async (payload) => {
  const { data } = await api.post("/inhabitant-classification", payload);
  return data.payload;
};

export const updateInhabitantClassification = async (id, payload) => {
  const { data } = await api.put(`/inhabitant-classification/${id}`, payload);
  return data.payload;
};

export const deleteInhabitantClassification = async (id) => {
  await api.delete(`/inhabitant-classification/${id}`);
};
