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

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

/**
 * Get all personalities (filtered by current admin language)
 */
export function usePersonalities() {
    const { currentLanguage } = useLanguage()
    return useQuery({
        queryKey: ['personalities', currentLanguage],
        queryFn: () => personalitiesApi.getPersonalities(currentLanguage),
    })
}
