import type { SkillsResponse } from '~/types/skill'

export function useFetchSkills() {
  const config = useRuntimeConfig()
  const { locale } = useI18n()

  return useFetch<SkillsResponse>('/skills', {
    baseURL: config.public.apiUrl as string,
    headers: {
      'X-API-Key': config.public.apiKey as string,
      'Accept-Language': locale.value,
    },
  })
}
