import { useSafeQuery } from '@/hooks/use-safe-query';
import { getTrainingStatisticsAction } from '../actions/training-actions';

export function useTrainingStatsQuery(params: {
    startDate?: string;
    endDate?: string;
    stateId?: number;
    municipalityId?: number;
    parishId?: number;
    ospType?: string;
} = {}) {
    return useSafeQuery(['training-statistics', JSON.stringify(params)], () => getTrainingStatisticsAction(params));
}
