import { apiGet, apiPost, apiPatch, apiDelete } from "../api"; export const getFeedInventory = () => apiGet("/inventory/feed"); export const createFeed = (data: any) => apiPost("/inventory/feed", data); export const createMedicine = (data: any) => apiPost("/inventory/medicine", data); export const createFishBatch = (data: any) => apiPost("/inventory/batches", data); export const createHarvestedFish = (data: any) => apiPost("/inventory/harvested", data); export const getFeedByFoodType = (foodId: string) => apiGet(`/inventory/feed/food-type/${foodId}`); export const getBatches = () => apiGet("/inventory/batches"); export const getBatchById = (id: string) => apiGet(`/inventory/batches/${id}`); export const quarantineBatch = (id: string) => apiPatch(`/inventory/batches/${id}/quarantine`, {}); export const healthCheckBatch = (id: string, data: any) => apiPatch(`/inventory/batches/${id}/health-check`, data); export const allocateBatch = (id: string, data: any) => apiPatch(`/inventory/batches/${id}/allocate`, data); export const deleteFeed = (id: string) => apiDelete(`/inventory/feed/${id}`); export const getMedicineInventory = () => apiGet("/inventory/medicine"); export const getMedicineInventoryTotal = () => apiGet("/inventory/medicine/total"); export const updateMedicineBatchQuantity = (id: string, newQuantity: number) => apiPatch(`/inventory/medicine/${id}/quantity`, { newQuantity }); export const deleteMedicineBatch = (id: string) => apiDelete(`/inventory/medicine/${id}`); export const addMedicineStock = (data: { medicineTypeId: string; quantity: number; mlPerUnit: number; company: string; receivedDate: string; expiryDate: string; }) => apiPost("/inventory/medicine/stock", data);