# CurrentReadingWidget

- File ID: file:1uvdam9:currentreadingwidget-razor
- Path: NexusReader.UI.Shared/Components/Organisms/CurrentReadingWidget.razor
- Role: ui-component
- Layer: frontend

## Purpose

Blazor UI component that displays the user's current reading/book progress card and provides navigation actions to continue reading or go to the library.

## Key Details

Razor component that conditionally renders a book card or empty state, exposes a LastReadBookDto parameter, uses NavigationManager for route changes, and composes NexusIcon child components.

## Symbols

- CurrentReadingWidget: Blazor UI component that displays the user's current reading/book progress card and provides navigation actions to continue reading or go to the library.
- Render (Razor markup): Renders the current-reading card UI and chooses between book view and empty state based on Book parameter.
- HandleContinueReading(): Handles the Continue Reading button click by navigating to the reader route for the current book and chapter.
- NavigateToLibrary (inline lambda): Inline click handler that navigates to the /library route.
- Book (component parameter): Component parameter that provides the last-read book details used to populate the UI.

## Dependencies

- imports NexusReader.UI.Shared/Components/Atoms/NexusIcon.razor

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: NexusReader.Application.DTOs.User
- dependency-target: framework:Microsoft.AspNetCore.Components.NavigationManager
- call-target: NexusReader.UI.Shared/Components/Atoms/NexusIcon.razor
- call-target: NexusReader.UI.Shared/Components/Atoms/NexusIcon.razor
- interaction-target: NavigationManager.NavigateTo($"/reader/{Book.Id}?chapter={Book.LastChapterIndex}") (framework call)
- interaction-target: NavigationManager.NavigateTo("/library") (framework call in inline lambda)

## Coverage

- Symbols: 5
- Executable symbols: 4
- Executable symbols with control flow: 4
- Grounded edges: 6
- Unresolved references: 6
- Control-flow fragments: 4
- Unresolved jumps: 2
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 4

## Control Flow Fragments

- Render (Razor markup): 31 nodes, 36 edges, 2 jumps, 0 unsupported constructs
- HandleContinueReading: 11 nodes, 12 edges, 0 jumps, 0 unsupported constructs
- NavigateToLibrary (inline lambda): 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
- Book (component parameter): 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs

## Diagrams

### CurrentReadingWidget Neighborhood

```mermaid
flowchart LR
    class_1tn889i_currentreadingwidget("CurrentReadingWidget")
    file_1uvdam9_currentreadingwidget_razor("CurrentReadingWidget")
    method_1lzfzn4_book_component_parameter[["Book (component parameter)"]]
    method_b9ya71_navigatetolibrary_inline_lambda[["NavigateToLibrary (inline lambda)"]]
    method_lwiyp5_render_razor_markup[["Render (Razor markup)"]]
    method_yy00ql_handlecontinuereading[["HandleContinueReading()"]]
    file_q8opk3_nexusicon_razor[/"NexusIcon"/]
    file_1uvdam9_currentreadingwidget_razor -->|NexusIcon| file_q8opk3_nexusicon_razor
```

### CurrentReadingWidget Execution Overview

```mermaid
flowchart TD
    class_1tn889i_currentreadingwidget("CurrentReadingWidget")
    method_1lzfzn4_book_component_parameter[["Book (component parameter)"]]
    method_b9ya71_navigatetolibrary_inline_lambda[["NavigateToLibrary (inline lambda)"]]
    method_lwiyp5_render_razor_markup[["Render (Razor markup)"]]
    method_yy00ql_handlecontinuereading[["HandleContinueReading()"]]
    unresolved_unresolved_19nu1lk_call_target{"Unresolved: NexusIcon"}
    unresolved_unresolved_1krli3s_interaction_target{"Unresolved: NavigationManager.NavigateTo($\\"/reader/{Book.Id}?chapter={Book.LastChapterIndex}\\") (framework call)"}
    unresolved_unresolved_u1e1jv_interaction_target{"Unresolved: NavigationManager.NavigateTo(\\"/library\\") (framework call in inline lambda)"}
    class_1tn889i_currentreadingwidget -->|contains| method_1lzfzn4_book_component_parameter
    class_1tn889i_currentreadingwidget -->|contains| method_b9ya71_navigatetolibrary_inline_lambda
    class_1tn889i_currentreadingwidget -->|contains| method_lwiyp5_render_razor_markup
    class_1tn889i_currentreadingwidget -->|contains| method_yy00ql_handlecontinuereading
    class_1tn889i_currentreadingwidget -->|unresolved interaction| unresolved_unresolved_1krli3s_interaction_target
    class_1tn889i_currentreadingwidget -->|unresolved interaction| unresolved_unresolved_u1e1jv_interaction_target
    method_lwiyp5_render_razor_markup -->|unresolved call| unresolved_unresolved_19nu1lk_call_target
    method_lwiyp5_render_razor_markup -->|unresolved call| unresolved_unresolved_19nu1lk_call_target
```

### Render (Razor markup)() Control Flow

_Warnings: diagram method_lwiyp5_render_razor_markup__fragment_diagram exceeds preferred complexity thresholds (31 nodes, 36 edges)._

```mermaid
---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    method_lwiyp5_render_razor_markup__call_46_NexusIcon[["NexusIcon"]]
    method_lwiyp5_render_razor_markup__call_56_NexusIcon[["NexusIcon"]]
    method_lwiyp5_render_razor_markup__action_25_render_data_25__linear("Progress display and inline style width")
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__condition{"!string.IsNullOrEmpty(Book.Description)"}
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__false("show empty excerpt")
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__merge("merge")
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__true("show description")
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__condition{"!string.IsNullOrEmpty(Book.Description)"}
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__false("false")
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__merge("merge")
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__true("true")
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__condition{"Falls back to alternate path"}
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__false("otherwise")
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__merge("merge")
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__true("fallback")
    method_lwiyp5_render_razor_markup__action_44_ui_binding_44__linear("Button click binds to HandleContinueReading")
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__condition{"Falls back to alternate path"}
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__false("otherwise")
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__merge("merge")
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__true("fallback")
    method_lwiyp5_render_razor_markup__action_6_branch_6__condition{"Conditional rendering based on Book presence"}
    method_lwiyp5_render_razor_markup__action_6_branch_6__false("false")
    method_lwiyp5_render_razor_markup__action_6_branch_6__merge("merge")
    method_lwiyp5_render_razor_markup__action_6_branch_6__true("true")
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__condition{"Book != null"}
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__false("false")
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__merge("merge")
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__true("true")
    method_lwiyp5_render_razor_markup__action_62_ui_binding_62__linear("Inline navigation lambda - navigate to /library")
    method_lwiyp5_render_razor_markup__entry(["Render (Razor markup) entry"])
    method_lwiyp5_render_razor_markup__implicit_return(["return"])
    method_lwiyp5_render_razor_markup__action_25_render_data_25__linear -->|next| method_lwiyp5_render_razor_markup__action_29_guard_clause_29__condition
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__condition -->|show empty excerpt| method_lwiyp5_render_razor_markup__action_29_guard_clause_29__false
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__condition -->|show description| method_lwiyp5_render_razor_markup__action_29_guard_clause_29__true
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__false -->|next| method_lwiyp5_render_razor_markup__action_29_guard_clause_29__merge
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__merge -->|next| method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__condition
    method_lwiyp5_render_razor_markup__action_29_guard_clause_29__true -->|next| method_lwiyp5_render_razor_markup__action_29_guard_clause_29__merge
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__condition -->|false| method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__false
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__condition -->|true| method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__true
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__false -->|next| method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__merge
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__merge -->|fallback| method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__condition
    method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__true -->|next| method_lwiyp5_render_razor_markup__action_29_render_razor_markup_branch_29_1__merge
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__condition -->|otherwise| method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__false
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__condition -->|fallback| method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__true
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__false -->|next| method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__merge
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__merge -->|next| method_lwiyp5_render_razor_markup__action_44_ui_binding_44__linear
    method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__true -->|next| method_lwiyp5_render_razor_markup__action_35_render_razor_markup_fallback_35_2__merge
    method_lwiyp5_render_razor_markup__action_44_ui_binding_44__linear -->|Name= arrow-right , Size=16| method_lwiyp5_render_razor_markup__call_46_NexusIcon
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__condition -->|otherwise| method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__false
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__condition -->|fallback| method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__true
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__false -->|next| method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__merge
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__merge -->|Name= book-open , Size=48| method_lwiyp5_render_razor_markup__call_56_NexusIcon
    method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__true -->|next| method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__merge
    method_lwiyp5_render_razor_markup__action_6_branch_6__condition -->|false| method_lwiyp5_render_razor_markup__action_6_branch_6__false
    method_lwiyp5_render_razor_markup__action_6_branch_6__condition -->|true| method_lwiyp5_render_razor_markup__action_6_branch_6__true
    method_lwiyp5_render_razor_markup__action_6_branch_6__false -->|next| method_lwiyp5_render_razor_markup__action_6_branch_6__merge
    method_lwiyp5_render_razor_markup__action_6_branch_6__merge -->|next| method_lwiyp5_render_razor_markup__action_25_render_data_25__linear
    method_lwiyp5_render_razor_markup__action_6_branch_6__true -->|next| method_lwiyp5_render_razor_markup__action_6_branch_6__merge
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__condition -->|false| method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__false
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__condition -->|true| method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__true
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__false -->|next| method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__merge
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__merge -->|next| method_lwiyp5_render_razor_markup__action_6_branch_6__condition
    method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__true -->|next| method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__merge
    method_lwiyp5_render_razor_markup__action_62_ui_binding_62__linear -->|return| method_lwiyp5_render_razor_markup__implicit_return
    method_lwiyp5_render_razor_markup__call_46_NexusIcon -->|fallback| method_lwiyp5_render_razor_markup__action_52_render_razor_markup_fallback_52_3__condition
    method_lwiyp5_render_razor_markup__call_56_NexusIcon -->|next| method_lwiyp5_render_razor_markup__action_62_ui_binding_62__linear
    method_lwiyp5_render_razor_markup__entry -->|next| method_lwiyp5_render_razor_markup__action_6_render_razor_markup_branch_6_0__condition
```

### HandleContinueReading() Control Flow

```mermaid
flowchart TD
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__condition{"Book != null"}
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__false("no-op")
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__merge("merge")
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__true("continue (navigate)")
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__condition{"Book != null"}
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__false("false")
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__merge("merge")
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__true("true")
    method_yy00ql_handlecontinuereading__entry(["HandleContinueReading entry"])
    method_yy00ql_handlecontinuereading__action_76_external_call_76__linear("Navigate to reader route")
    method_yy00ql_handlecontinuereading__implicit_return(["return"])
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__condition -->|no-op| method_yy00ql_handlecontinuereading__action_74_guard_clause_74__false
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__condition -->|continue navigate| method_yy00ql_handlecontinuereading__action_74_guard_clause_74__true
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__false -->|next| method_yy00ql_handlecontinuereading__action_74_guard_clause_74__merge
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__merge -->|next| method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__condition
    method_yy00ql_handlecontinuereading__action_74_guard_clause_74__true -->|next| method_yy00ql_handlecontinuereading__action_74_guard_clause_74__merge
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__condition -->|false| method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__false
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__condition -->|true| method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__true
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__false -->|next| method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__merge
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__merge -->|next| method_yy00ql_handlecontinuereading__action_76_external_call_76__linear
    method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__true -->|next| method_yy00ql_handlecontinuereading__action_74_handlecontinuereading_branch_74_0__merge
    method_yy00ql_handlecontinuereading__action_76_external_call_76__linear -->|return| method_yy00ql_handlecontinuereading__implicit_return
    method_yy00ql_handlecontinuereading__entry -->|next| method_yy00ql_handlecontinuereading__action_74_guard_clause_74__condition
```

## Diagram Validation

- Status: warn
- Warning: Control-flow extraction left 2 unresolved jumps.
- Warning: control-flow: diagram method_lwiyp5_render_razor_markup__fragment_diagram exceeds preferred complexity thresholds (31 nodes, 36 edges).
