import { useQuery } from '@tanstack/react-query';
import { getTrashMessages } from '../service/TrashService';
import { MessageListQueryDto } from '../types/TrashTypes';

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

// Note: useRestoreMessage is now handled by useEmailActions hook 