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

part of '../../locked_time.dart';

/// Weekday value using DateTime's Monday-first convention.
///
/// Dart represents weekdays as integers where Monday is `1` and Sunday is `7`.
/// This enum wraps those integers so the rest of the code can talk in readable
/// names while still comparing directly to [DateTime.weekday].
enum LockedWeekday {
  /// Selects the `monday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  monday(DateTime.monday),

  /// Selects the `tuesday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  tuesday(DateTime.tuesday),

  /// Selects the `wednesday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  wednesday(DateTime.wednesday),

  /// Selects the `thursday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  thursday(DateTime.thursday),

  /// Selects the `friday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  friday(DateTime.friday),

  /// Selects the `saturday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  saturday(DateTime.saturday),

  /// Selects the `sunday` option from this enum.
  /// Code should use this named value when it needs this exact scheduler state, presentation token, or persistence meaning.
  sunday(DateTime.sunday);

  /// Creates a `LockedWeekday` 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 LockedWeekday(this.dateTimeValue);

  /// Matching [DateTime.weekday] integer value.
  final int dateTimeValue;
}
