import { api } from "@/config/axios";
import { CategoriesResponse, FoodsResponse } from "../types/Types";

export const getFoods = async (slug: string): Promise<FoodsResponse> => {
  const response = await api.get<FoodsResponse>(
    `/public/foods/restaurant/${slug}`
  );
  return response.data;
};

export const getCategories = async (
  slug: string
): Promise<CategoriesResponse> => {
  const response = await api.get<CategoriesResponse>(
    `/public/categories/restaurant/${slug}`
  );
  return response.data;
};
