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

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

/// Request for the Backlog board projection.
class GetBacklogBoardRequest {
  /// Creates a board request with optional search, filters, sorting, and grouping.
  GetBacklogBoardRequest({
    required this.context,
    required this.localDate,
    this.searchText,
    List<BacklogFilter> filters = const <BacklogFilter>[],
    this.sortKey = BacklogSortKey.priority,
    this.groupMode = BacklogBoardGroupMode.none,
  }) : filters = List<BacklogFilter>.unmodifiable(filters);

  /// Read context containing owner scope and read instant.
  final ApplicationOperationContext context;

  /// Owner-local date used for schedule preview context.
  final CivilDate localDate;

  /// Optional user-entered search text.
  final String? searchText;

  /// Optional user-facing backlog filters.
  final List<BacklogFilter> filters;

  /// User-facing sort order used inside each board bucket.
  final BacklogSortKey sortKey;

  /// Optional grouping mode requested by the UI.
  final BacklogBoardGroupMode groupMode;
}
