using System.Text.Json.Serialization; namespace NexusReader.Application.Queries.Reader; [JsonDerivedType(typeof(TextSegmentBlock), "text")] [JsonDerivedType(typeof(AiActionTriggerBlock), "trigger")] public abstract record ContentBlock(string Id); public record TextSegmentBlock(string Id, string Content) : ContentBlock(Id); public record AiActionTriggerBlock(string Id, string Dialogue, List ActionOptions) : ContentBlock(Id); public record ReaderPageViewModel(List Blocks, int CurrentChapterIndex, int TotalChapters, string ChapterTitle);