export class LoadRecentJobHistoryUseCase {
    deps;
    constructor(deps) {
        this.deps = deps;
    }
    async execute(input) {
        const records = await this.deps.jobHistoryGateway.loadRecordsWithinWindow(input.retentionDays, input.now());
        return [...records].sort((left, right) => right.completedAt.localeCompare(left.completedAt));
    }
}
//# sourceMappingURL=loadRecentJobHistory.usecase.js.map