import axios from "axios";

/**
 * @param {string} date - Date in YYYY-MM-DD format
 * @returns {Promise<{governmental: Array, free: Array}>} Object containing governmental and free inventory data
 */
export const slaughterGetKillhouseRemainWeight = async (d) => {
  try {
    const response = await axios.get("/kill-house-remain-weight/", {
      params: d,
    });
    return {
      governmental: response.data?.governmental || [],
      free: response.data?.free || [],
    };
  } catch (error) {
    console.error("Error fetching killhouse remain weight:", error);
    throw error;
  }
};
