// SPDX-FileCopyrightText: 2026 FocusFlow contributors
// SPDX-License-Identifier: AGPL-3.0-only

part of '../../../application_management.dart';

/// Drawer-level read model for a selected Backlog task.
class BacklogTaskDetailReadModel {
  /// Creates a task detail result for the Backlog drawer.
  BacklogTaskDetailReadModel({
    required this.item,
    required this.addedLabel,
    required List<String> tags,
    required List<ProjectOptionReadModel> projectOptions,
    required List<SuggestedSlotReadModel> suggestedSlots,
    this.notes,
    this.suggestedSlotUnavailableReason,
  })  : tags = List<String>.unmodifiable(tags),
        projectOptions = List<ProjectOptionReadModel>.unmodifiable(
          projectOptions,
        ),
        suggestedSlots = List<SuggestedSlotReadModel>.unmodifiable(
          suggestedSlots,
        );

  /// Board card model for the selected task.
  final BacklogBoardItemReadModel item;

  /// Optional long-form notes for the drawer.
  final String? notes;

  /// Display label describing when the task was added to Backlog.
  final String addedLabel;

  /// Display-ready task-local tag labels.
  final List<String> tags;

  /// Available project choices for the selected task.
  final List<ProjectOptionReadModel> projectOptions;

  /// Non-mutating suggested schedule slots.
  final List<SuggestedSlotReadModel> suggestedSlots;

  /// Display reason when slot suggestions are unavailable.
  final String? suggestedSlotUnavailableReason;
}
