@model WritingIntentDisplayViewModel @{ var scene = Model.Context?.Scene; var position = Model.Context?.Position; var workflow = Model.ChapterWorkflow; var chapter = workflow?.Chapter ?? Model.Context?.Chapter; var book = workflow?.Book ?? Model.Context?.Book; var project = workflow?.Project ?? Model.Context?.Project; var projectId = position?.ProjectId ?? project?.ProjectID; var bookId = position?.BookId ?? book?.BookID; var chapterId = position?.ChapterId ?? chapter?.ChapterID; var sceneId = position?.SceneId; }
@if (!Model.HasChapter && scene is null) {

Intent

@Model.EmptyTitle

@Model.EmptyMessage

} else {

@project?.ProjectName

@(scene?.SceneTitle ?? $"Chapter {chapter?.ChapterNumber:g}: {chapter?.ChapterTitle}")

@book?.BookDisplayTitle @if (chapter is not null) { Chapter @chapter.ChapterNumber:g } @if (scene is not null) { Scene @scene.SceneNumber:g }

@if (Model.IsChapterOnly) {

No current scene. Showing chapter intent.

} else if (scene is not null && string.IsNullOrWhiteSpace(scene.Summary) && string.IsNullOrWhiteSpace(scene.ScenePurposeNotes) && !scene.ChecklistItems.Any()) {

No scene-specific plan. Showing chapter intent.

}
@if (chapter is not null) { } @if (scene is not null) { Edit Scene } else if (chapter is not null) { Edit Chapter Plan }
}