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

part of '../focus_flow_app.dart';

/// Private implementation type for `_TodayScreenScaffold` in this library.
/// It keeps supporting state and behavior scoped to the owning file so the public API stays focused on the scheduler concepts that callers use directly.
class _TodayScreenScaffold extends StatefulWidget {
  /// Creates a `_TodayScreenScaffold` instance with the values required by its invariants.
  /// Callers should pass already-normalized scheduler data because validation and defaulting belong at the model or service boundary, not in arbitrary UI code.
  const _TodayScreenScaffold({
    required this.data,
    required this.selectedCard,
    required this.onSelectCard,
    required this.onCompleteCard,
    required this.onPushToNext,
    required this.onPushToTomorrow,
    required this.onPushToBacklog,
    required this.onRemoveCard,
    required this.onAddTask,
    required this.onClearSelection,
    required this.onPreviousDate,
    required this.onNextDate,
    required this.onChooseDate,
  });

  /// Stores the `data` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final TodayScreenData data;

  /// Stores the `selectedCard` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final TimelineCardModel? selectedCard;

  /// Stores the `onSelectCard` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final ValueChanged<TimelineCardModel> onSelectCard;

  /// Stores the `onCompleteCard` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function(TimelineCardModel card) onCompleteCard;

  /// Stores the `onPushToNext` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function(TimelineCardModel card) onPushToNext;

  /// Stores the `onPushToTomorrow` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function(TimelineCardModel card) onPushToTomorrow;

  /// Stores the `onPushToBacklog` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function(TimelineCardModel card) onPushToBacklog;

  /// Stores the `onRemoveCard` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function(TimelineCardModel card) onRemoveCard;

  /// Stores the `onAddTask` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final Future<void> Function() onAddTask;

  /// Stores the `onClearSelection` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final VoidCallback onClearSelection;

  /// Stores the `onPreviousDate` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final VoidCallback onPreviousDate;

  /// Stores the `onNextDate` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final VoidCallback onNextDate;

  /// Stores the `onChooseDate` value for this object.
  /// This field is part of the explicit state that downstream scheduling, persistence, or UI code reads when composing behavior.
  final VoidCallback onChooseDate;

  /// Creates the mutable state object used by this stateful widget.
  /// Flutter calls this once for each mounted widget instance before lifecycle callbacks and builds begin.
  @override
  State<_TodayScreenScaffold> createState() => _TodayScreenScaffoldState();
}
