import { useQuery } from '@tanstack/react-query';
import { getSentMessages } from '../service/SentService';
import { MessageListQueryDto } from '../types/SentTypes';

export const useGetSentMessages = (query: MessageListQueryDto) => {
    return useQuery({
        queryKey: ['sent-messages', query],
        queryFn: () => getSentMessages(query),
        staleTime: 5 * 60 * 1000, // 5 minutes
    });
}; 