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

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

/// Patch used when updating configured project defaults.
class ProjectProfileUpdate {
  /// Creates a `ProjectProfileUpdate` 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 ProjectProfileUpdate({
    this.name,
    this.colorKey,
    this.defaultPriority,
    this.defaultReward,
    this.defaultDifficulty,
    this.defaultReminderProfile,
    this.defaultDurationMinutes,
    this.clearDefaultDuration = false,
  });

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

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

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

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

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

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

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

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