/**
 * React Query hooks for Opening Screen Presets
 * @since 1.1.0
 */

import { useQuery } from '@tanstack/react-query'
import { openingScreenPresetsApi } from '@/api/opening-screen-presets'
import { useLanguage } from '@/contexts/LanguageContext'

/**
 * Get all opening screen presets (filtered by current admin language)
 */
export function useOpeningScreenPresets() {
    const { currentLanguage } = useLanguage()
    return useQuery({
        queryKey: ['opening-screen-presets', currentLanguage],
        queryFn: () => openingScreenPresetsApi.getPresets(currentLanguage),
    })
}
