namespace TornadoAce_CJOnStyle.Domain
{
    public sealed record InspectionFieldResult(
        string CueSheetField,
        string SceneObjectName,
        string ExpectedText,
        string ActualText,
        double MatchRate,
        string Severity,
        string Decision);

    public sealed record InspectionResult(
        string CueSheetId,
        string ProgramTitle,
        string SceneName,
        double MatchRate,
        string Severity,
        string Decision,
        IReadOnlyList<InspectionFieldResult> FieldResults)
    {
        public InspectionResult(
            string cueSheetId,
            string programTitle,
            string sceneName,
            double matchRate,
            string severity,
            string decision)
            : this(cueSheetId, programTitle, sceneName, matchRate, severity, decision, [])
        {
        }
    }

    public sealed record LlmReviewField(
        string CueSheetField,
        string SceneObjectName,
        string ExpectedText,
        string ActualText,
        double MatchRate,
        string Severity);

    public sealed record LlmReviewRequest(
        string RequestId,
        string CueSheetId,
        string ProgramTitle,
        string SceneName,
        string PromptKey,
        string Policy,
        string RecommendedPriority,
        IReadOnlyList<LlmReviewField> Fields)
    {
        public string AuditSummary =>
            $"{RequestId} / {CueSheetId} / {RecommendedPriority} / {Fields.Count} field(s)";
    }
}
