from __future__ import annotations

from rights_filter.domain.records import (
    InMemoryRightsFilterRepository,
    KnowledgeBaseEntry,
)


def correct_rejected_decision(
    repository: InMemoryRightsFilterRepository,
    decision_id: str,
    reason: str,
) -> list[KnowledgeBaseEntry]:
    return repository.deactivate_entries_for_source_decision(decision_id, reason)
