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

/// Defines Backlog board screen presentation data.
library;

import 'package:scheduler_core/scheduler_core.dart';

/// Presentation data consumed by the Backlog board screen shell.
class BacklogBoardScreenData {
  /// Creates Backlog screen data from a board query result and optional detail.
  const BacklogBoardScreenData({required this.board, this.selectedTaskDetail});

  /// Public scheduler read model for the current Backlog board.
  final BacklogBoardQueryResult board;

  /// Public scheduler read model for the selected task drawer, if loaded.
  final BacklogTaskDetailReadModel? selectedTaskDetail;

  /// Stable board columns in display order.
  List<BacklogBoardColumnReadModel> get columns => board.columns;

  /// Summary read model for the current board filters.
  BacklogBoardSummaryReadModel get summary => board.summary;

  /// Selected task id if a drawer should be considered open.
  String? get selectedTaskId => selectedTaskDetail?.item.taskId;
}
