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

part of '../../project_statistics.dart';

/// Configured project defaults plus optional suggestions kept separate.
class ProjectDefaultResolution {
  /// Creates a `ProjectDefaultResolution` 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 ProjectDefaultResolution({
    required this.project,
    required this.suggestions,
  });

  /// Authoritative configured project profile.
  final ProjectProfile project;

  /// Optional learned suggestions that UI can present explicitly.
  final ProjectSuggestionSet suggestions;

  /// Returns the derived `configuredDurationMinutes` value for this object.
  /// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
  int? get configuredDurationMinutes => project.defaultDurationMinutes;

  /// Returns the derived `configuredReward` value for this object.
  /// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
  RewardLevel get configuredReward => project.defaultReward;

  /// Returns the derived `configuredDifficulty` value for this object.
  /// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
  DifficultyLevel get configuredDifficulty => project.defaultDifficulty;

  /// Returns the derived `configuredReminderProfile` value for this object.
  /// Keeping this as an accessor gives callers a stable read surface while the owning type controls how the value is calculated.
  ReminderProfile get configuredReminderProfile =>
      project.defaultReminderProfile;
}
