import { useQuery } from '@pinia/colada';
import { u as useApi } from './useApi-Dv-cyvzn.mjs';
import { d as useI18n } from './server.mjs';
import { computed } from 'vue';

function useGlobalTestimonialsQuery() {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["testimonials", locale.value]),
    query: async () => {
      try {
        const response = await get(`testimonials`);
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}
function useServiceTestimonialsQuery(service) {
  const { get } = useApi();
  const { locale } = useI18n();
  return useQuery({
    staleTime: 1e3 * 60 * 60,
    key: computed(() => ["testimonials", locale.value, service]),
    query: async () => {
      try {
        const response = await get(
          `testimonials?service=${service}`
        );
        return response.data.data;
      } catch (error) {
        console.error(error.message);
      }
    }
  });
}

export { useServiceTestimonialsQuery as a, useGlobalTestimonialsQuery as u };
//# sourceMappingURL=testimonials-COgXn_Zu.mjs.map
