import { useQuery } from '@tanstack/react-query';
import { getFavoriteMessages } from '../service/FavoriteService';
import { MessageListQueryDto } from '../types/FavoriteTypes';

export const useGetFavoriteMessages = (query: MessageListQueryDto) => {
    return useQuery({
        queryKey: ['favorite-messages', query],
        queryFn: () => getFavoriteMessages(query),
        staleTime: 0
    });
};

// Note: useUnfavoriteMessage is now handled by useEmailActions hook 