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

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

/// One optional learned suggestion with provenance.
class ProjectSuggestion<T extends Object> {
  /// Creates a `ProjectSuggestion` 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 ProjectSuggestion({
    required this.type,
    required this.value,
    required this.sampleSize,
    required this.supportingSampleCount,
    required this.minimumSampleSize,
    required this.confidence,
  });

  /// Suggestion category.
  final ProjectSuggestionType type;

  /// Suggested value.
  final T value;

  /// Number of meaningful observations considered.
  final int sampleSize;

  /// Observations that support [value].
  final int supportingSampleCount;

  /// Minimum sample threshold used before producing the suggestion.
  final int minimumSampleSize;

  /// Concentration of supporting observations.
  final ProjectSuggestionConfidence confidence;
}
