import ApiService from "@/services/ApiService";

const base = "admin/impresoras";

export const list = async (params = {}) => {
  const res = await ApiService.get(base, { params });
  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 remove = async (id) => {
  const res = await ApiService.delete(`${base}/${id}`);
  return res.data;
};

export const testPrint = async (id) => {
  const res = await ApiService.post(`${base}/${id}/test-print`);
  return res.data;
};
