import ApiService from "@/services/ApiService";

const base = "caja";

export const getEstado = async () => {
  const res = await ApiService.get(`${base}/estado`);
  return res.data;
};

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

export const cortar = async (opts = {}) => {
  const res = await ApiService.post(`${base}/cortar`, opts);
  return res.data;
};

export const getMovimientos = async () => {
  const res = await ApiService.get(`${base}/movimientos`);
  return res.data;
};

export const storeMovimiento = async (payload) => {
  const res = await ApiService.post(`${base}/movimientos`, payload);
  return res.data;
};
