using PlotLine.Models; namespace PlotLine.ViewModels; public sealed class PlotLineWorkspaceViewModel { public Project Project { get; set; } = new(); public int? SelectedBookID { get; set; } public int? SelectedScenarioID { get; set; } public string? SelectedScenarioName { get; set; } public string Mode { get; set; } = "Focus"; public bool ShowSuggestions { get; set; } public IReadOnlyList Books { get; set; } = []; public IReadOnlyList Scenarios { get; set; } = []; public IReadOnlyList PlotLines { get; set; } = []; public IReadOnlyList SelectedPlotLineIDs { get; set; } = []; public IReadOnlyList SelectedThreadIDs { get; set; } = []; public IReadOnlyList Scenes { get; set; } = []; public IReadOnlyList SuggestedScenes { get; set; } = []; public IReadOnlyList ProposedOnlyScenes { get; set; } = []; public IReadOnlyList NoKnownAttributionScenes { get; set; } = []; public bool IsUnattributedMode => string.Equals(Mode, "Unattributed", StringComparison.OrdinalIgnoreCase); public bool IsWeaveMode => SelectedPlotLineIDs.Count > 1; } public sealed class PlotLineWorkspaceLineViewModel { public PlotLineWorkspaceLineRow Line { get; set; } = new(); public bool IsSelected { get; set; } public IReadOnlyList Threads { get; set; } = []; } public sealed class PlotLineWorkspaceSceneViewModel { public int SceneID { get; set; } public int NarrativeOrder { get; set; } public int GapBefore { get; set; } public int ChapterGapBefore { get; set; } public decimal ChapterNumber { get; set; } public string ChapterTitle { get; set; } = string.Empty; public decimal SceneNumber { get; set; } public string SceneTitle { get; set; } = string.Empty; public string? Summary { get; set; } public string? PovCharacterName { get; set; } public string? LocationName { get; set; } public string? TimeLabel { get; set; } public int WarningCount { get; set; } public int DependencyCount { get; set; } public bool HasManuscript { get; set; } public int StructuralTargetCount { get; set; } public IReadOnlyList Memberships { get; set; } = []; public IReadOnlyList Connections { get; set; } = []; public bool IsShared => Memberships.Select(x => x.PlotLineID).Distinct().Count() > 1; } public sealed class PlotLineWorkspaceSceneMembershipViewModel { public int PlotLineID { get; set; } public string PlotLineName { get; set; } = string.Empty; public string Colour { get; set; } = "#2f6f63"; public IReadOnlyList Contributions { get; set; } = []; } public sealed class PlotLineWorkspaceSuggestionSceneViewModel { public PlotLineWorkspaceAttributionRow Scene { get; set; } = new(); public IReadOnlyList Suggestions { get; set; } = []; } public sealed class PlotLineWorkspaceInspectorViewModel { public int ProjectID { get; set; } public int? BookID { get; set; } public SceneEditViewModel Scene { get; set; } = new(); public IReadOnlyList Memberships { get; set; } = []; public IReadOnlyList Threads { get; set; } = []; public IReadOnlyList Dependencies { get; set; } = []; public IReadOnlyList Targets { get; set; } = []; public IReadOnlyList Suggestions { get; set; } = []; } public sealed class PlotLineWorkspaceTargetViewModel { public string SourcePlotLineName { get; set; } = string.Empty; public string TargetPlotLineName { get; set; } = string.Empty; public string StructuralType { get; set; } = string.Empty; } public sealed class PlotLineWorkspaceManuscriptViewModel { public int SceneID { get; set; } public string SceneTitle { get; set; } = string.Empty; public string SourceText { get; set; } = string.Empty; public int SourceWordCount { get; set; } }