/**
 * React Query hooks for Tones
 * @since 1.2.0
 */

import { useQuery } from '@tanstack/react-query'
import { tonesApi } from '@/api/tones'
import { useLanguage } from '@/contexts/LanguageContext'

/**
 * Get all tones (filtered by current admin language)
 */
export function useTones() {
  const { currentLanguage } = useLanguage()
  return useQuery({
    queryKey: ['tones', currentLanguage],
    queryFn: () => tonesApi.list(currentLanguage),
  })
}
