@model StoryIntelligenceCompletionViewModel
@{
    ViewData["Title"] = "Scenes created";
}

<section class="onboarding-shell" aria-labelledby="story-complete-title">
    <div class="onboarding-panel onboarding-review-panel">
        <partial name="_StoryIntelligencePipelineHeader" model="@(new StoryIntelligencePipelineHeaderViewModel { CurrentStage = "Complete" })" />
        <div class="onboarding-copy story-review-heading">
            <p class="eyebrow">Phase 4</p>
            <p class="story-review-heading__phase">Build Story Database</p>
            <div class="onboarding-success-heading">
                <span aria-hidden="true">&check;</span>
                <h1 id="story-complete-title">Story Intelligence complete</h1>
            </div>
            <p>PlotDirector has built the implemented story database records from your reviewed manuscript analysis.</p>
        </div>

        <section class="story-database-build" aria-label="Story database build checklist">
            <h2>Building your Story Database...</h2>
            <ul>
                <li><span aria-hidden="true">&check;</span><strong>Chapters</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Scenes</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Characters</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Locations</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Assets</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Relationships</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Knowledge</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Preparing continuity...</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Generating story indexes...</strong></li>
                <li><span aria-hidden="true">&check;</span><strong>Finalising project...</strong></li>
            </ul>
        </section>

        <div class="onboarding-scan-counts onboarding-review-counts">
            <div>
                <span>Chapters analysed</span>
                <strong>@Model.ChaptersCommitted</strong>
            </div>
            <div>
                <span>Scenes prepared / created</span>
                <strong>@Model.ScenesCreated</strong>
            </div>
            <div>
                <span>Characters created / linked</span>
                <strong>@Model.CharactersCreatedOrLinked.ToString("N0")</strong>
            </div>
            <div>
                <span>Locations created / linked</span>
                <strong>@Model.LocationsCreatedOrLinked.ToString("N0")</strong>
            </div>
            <div>
                <span>Assets created / linked</span>
                <strong>@Model.AssetsCreatedOrLinked.ToString("N0")</strong>
            </div>
            <div>
                <span>Relationships created / linked</span>
                <strong>@Model.RelationshipsCreatedOrLinked.ToString("N0")</strong>
            </div>
            <div>
                <span>Book</span>
                <strong>@Model.BookTitle</strong>
            </div>
        </div>

        <div class="onboarding-actions">
            <a class="btn btn-primary" asp-controller="Writer" asp-action="Index" asp-route-projectId="@Model.ProjectID">View scenes</a>
            <a class="btn btn-outline-primary" asp-controller="Books" asp-action="Details" asp-route-id="@Model.BookID">View book</a>
            @if (Model.FirstChapterID.HasValue)
            {
                <a class="btn btn-outline-primary" asp-controller="Writer" asp-action="Chapter" asp-route-id="@Model.FirstChapterID">Open first chapter</a>
            }
            <a class="btn btn-outline-secondary" asp-controller="Projects" asp-action="Index">Back to Dashboard</a>
        </div>
    </div>
</section>
