export const useApi = () => { const config = useRuntimeConfig() const { locale } = useI18n() const apiFetch = async (endpoint: string, options: Record = {}) => { return await $fetch(`${config.public.apiUrl}${endpoint}`, { ...options, headers: { 'X-API-Key': config.public.apiKey as string, 'Accept-Language': locale.value, 'Content-Type': 'application/json', ...options.headers, }, }) } return { apiFetch } }