"""
Tests for Sentinel Expert Report V1.
"""

from dataclasses import dataclass

from sentinel.brain.expert_report import ExpertReportBuilder


@dataclass
class FakeAnalysis:
    health_score: float = 100.0
    status: str = "EXCELLENT"
    root_cause_code: str = "NO_ANOMALY_DETECTED"
    risk_index: float = 0.0
    prediction_horizon_days: int | None = None
    prediction_confidence: float = 95.0
    confidence: float = 95.0


def test_report_in_english() -> None:
    report = ExpertReportBuilder().build(
        equipment_id="freezer-test-001",
        analysis=FakeAnalysis(),
        language="en",
    )

    assert report.title == "Sentinel Expert Report"
    assert report.root_cause == "No anomaly detected."


def test_report_in_french() -> None:
    report = ExpertReportBuilder().build(
        equipment_id="freezer-test-001",
        analysis=FakeAnalysis(),
        language="fr",
    )

    assert report.title == "Rapport expert Sentinel"
    assert report.root_cause == "Aucune anomalie détectée."
