#
#   Imandra Inc.
#
#   speclogician/presentation/models/state_instance.py
#

from __future__ import annotations

from typing import Literal

from pydantic import BaseModel

from speclogician.presentation.models.state_instance_summary import StateInstanceSummaryPM
from speclogician.presentation.models.spec import SpecPM
from speclogician.presentation.models.container import ArtifactContainerPM
from speclogician.presentation.models.state_diff import StateDiffPM
from speclogician.presentation.models.recommendations import RecommendationsPM

# NEW: trace reachability presentation model
from speclogician.presentation.models.trace_reachability import TraceReachabilityPM


class StateInstancePM(BaseModel):
    kind: Literal["state_instance"] = "state_instance"

    summary: StateInstanceSummaryPM

    # Optional heavy sections
    spec: SpecPM | None = None
    artifacts: ArtifactContainerPM | None = None
    state_diff: StateDiffPM | None = None

    # Analyses
    trace_reachability: TraceReachabilityPM | None = None

    # Recommendations (computed after change/diff)
    recommendations: RecommendationsPM