import { api } from "@/config/axios";
import {
  AboutResponse,
  ReviewsResponse,
  SchedulesResponse,
} from "../types/Types";

export const getAbout = async (name: string): Promise<AboutResponse> => {
  const { data } = await api.get<AboutResponse>(`/public/shops/${name}`);
  return data;
};

export const getReviews = async (name: string): Promise<ReviewsResponse> => {
  const { data } = await api.get<ReviewsResponse>(
    `/public/reviews/shop/${name}`
  );
  return data;
};

export const getSchedules = async (
  name: string
): Promise<SchedulesResponse> => {
  const { data } = await api.get<SchedulesResponse>(
    `/public/schedules/shop/${name}`
  );
  return data;
};
