import { useQuery } from "@pinia/colada";
import { u as useApi } from "./useApi-Dv-cyvzn.js";
import { d as useI18n } from "../server.mjs";
import { computed } from "vue";
function useFeaturedWebProjects() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => [`featuredWebProjects`, locale.value]),
    query: async () => {
      try {
        const response = await get(`web_projects`);
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}
function useFeaturedMobileProjects() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => [`featuredMobileProjects`, locale.value]),
    query: async () => {
      try {
        const response = await get(`app_projects`);
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}
function useFeaturedProjects() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["featuredPorjects", locale.value]),
    query: async () => {
      try {
        const response = await get("featured_projects");
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}
function useSpecificFeaturedProjects(id) {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["featuredPorjects", id, locale.value]),
    query: async () => {
      try {
        const response = await get(
          `featured_projects?service_id=${id}`
        );
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}
export {
  useFeaturedProjects as a,
  useFeaturedWebProjects as b,
  useFeaturedMobileProjects as c,
  useSpecificFeaturedProjects as u
};
//# sourceMappingURL=featuredProjects-mqGdBkCO.js.map
