"use client";

import { 
  fetchAllShopsAction, 
  findTruckLaneByShopIdAction,
  updateTruckLaneAction,
  deleteTruckLaneAction,
  createTruckAction,
  type SaveTruckLane,
  type DeleteTruckLane,
  type SaveTruckRequest,
  type MessageResponse
} from "./actions";

export const fetchAllShopsClient = async (params?: Record<string, string | number | null>) => {
  return await fetchAllShopsAction(params);
};

export const findTruckLaneByShopIdClient = async (shopId: number | string) => {
  return await findTruckLaneByShopIdAction(shopId);
};

export const updateTruckLaneClient = async (data: SaveTruckLane): Promise<MessageResponse> => {
  return await updateTruckLaneAction(data);
};

export const deleteTruckLaneClient = async (data: DeleteTruckLane): Promise<MessageResponse> => {
  return await deleteTruckLaneAction(data);
};

export const createTruckClient = async (data: SaveTruckRequest): Promise<MessageResponse> => {
  return await createTruckAction(data);
};

export default fetchAllShopsClient;
