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 useMarketingVideosQuery() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["marketingVideos", locale.value]),
    query: async () => {
      try {
        const response = await get(
          "digital-marketing/videos"
        );
        return response.data.data.videos;
      } catch (err) {
        console.error(err.message);
      }
    }
  });
}
function useMarketingShortsVideosQuery() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["shortVideos", locale.value]),
    query: async () => {
      try {
        const response = await get("shorts_videos");
        return response.data.data;
      } catch (err) {
        console.error(err.message);
      }
    }
  });
}
function useMarketingPostsQuery() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["marketingPosts", locale.value]),
    query: async () => {
      try {
        const response = await get(
          "digital-marketing/posts"
        );
        return response.data.data.posts;
      } catch (err) {
        console.error(err.message);
      }
    }
  });
}
function useMarketingStaticsQuery() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["marketingStatics", locale.value]),
    query: async () => {
      try {
        const response = await get("digital-marketing/tabs");
        return response.data.data.tabs;
      } catch (err) {
        console.error(err.message);
      }
    }
  });
}
export {
  useMarketingPostsQuery as a,
  useMarketingStaticsQuery as b,
  useMarketingVideosQuery as c,
  useMarketingShortsVideosQuery as u
};
//# sourceMappingURL=marketing-lpt_YDVO.js.map
