import 'package:flutter/material.dart';
import '../l10n/strings.g.dart';

/// Represents the current state of the application's localization.
class LocaleState {
  /// The current active locale.
  final Locale locale;

  /// The list of supported locales for the application.
  final List<Locale> supportedLocales;

  /// Creates a [LocaleState] with the specified [locale].
  const LocaleState({required this.locale, required this.supportedLocales});

  /// The initial state of the application, defaulting to English.
  factory LocaleState.initial() => LocaleState(
    locale: const Locale('es'),
    supportedLocales: AppLocaleUtils.supportedLocales,
  );
}
