export function cancelReview(jobId, deps) {
    const { queuePort, logger } = deps;
    const status = queuePort.getJobStatus(jobId);
    if (status === null) {
        logger.warn({ jobId }, 'Job not found for cancellation');
        return { status: 'not-found', jobId };
    }
    if (status === 'completed' || status === 'failed') {
        logger.info({ jobId, status }, 'Job already completed, cannot cancel');
        return { status: 'already-completed', jobId };
    }
    const cancelled = queuePort.cancelJob(jobId);
    if (cancelled) {
        logger.info({ jobId }, 'Review cancelled');
        return { status: 'cancelled', jobId };
    }
    return { status: 'not-found', jobId };
}
//# sourceMappingURL=cancelReview.usecase.js.map