import api from "../axios";
import { API_ENDPOINTS } from "../endpoints";

export const flagsService = {
  getCountryFlag: async (countryCode: string) => {

    try {
      const response = await api.get(API_ENDPOINTS.FLAGS(countryCode));
      return response.data;
    } catch (error) {
      console.error("ERROR caught in Flags Service", error);
      throw error;
    }
  },
};
