export class StubReviewQueuePort {
    jobStatuses = new Map();
    enqueuedJobs = [];
    shouldRejectEnqueue = false;
    cancelledJobs = [];
    hasActiveJob(jobId) {
        const status = this.jobStatuses.get(jobId);
        return status === 'queued' || status === 'running';
    }
    enqueue(job) {
        if (this.shouldRejectEnqueue) {
            return false;
        }
        this.enqueuedJobs.push(job);
        this.jobStatuses.set(job.id, 'queued');
        return true;
    }
    createJobId(platform, projectPath, mrNumber) {
        return `${platform}:${projectPath}:${mrNumber}`;
    }
    getJobStatus(jobId) {
        return this.jobStatuses.get(jobId) ?? null;
    }
    cancelJob(jobId) {
        const status = this.jobStatuses.get(jobId);
        if (status === 'queued' || status === 'running') {
            this.jobStatuses.delete(jobId);
            this.cancelledJobs.push(jobId);
            return true;
        }
        return false;
    }
    addActiveJob(jobId, status = 'running') {
        this.jobStatuses.set(jobId, status);
    }
    setJobStatus(jobId, status) {
        this.jobStatuses.set(jobId, status);
    }
    clear() {
        this.jobStatuses.clear();
        this.enqueuedJobs = [];
        this.cancelledJobs = [];
        this.shouldRejectEnqueue = false;
    }
}
//# sourceMappingURL=reviewQueue.stub.js.map