"""Visit session lifecycle policies — Phase 13.2."""
from __future__ import annotations

from app.models.types import VisitSessionAction, VisitSessionStatus
from app.validators.doctor_panel import ensure_visit_session_transition, target_status_for


class VisitSessionPolicy:
    def ensure_transition(
        self, *, action: VisitSessionAction, current: VisitSessionStatus
    ) -> VisitSessionStatus:
        ensure_visit_session_transition(action=action, current=current)
        return target_status_for(action)
