import 'dart:ui';

/// Interface for the locale repository.
///
/// This defines the contracts for persisting and retrieving the application's locale.
/// Implementations of this interface should handle the details of the storage mechanism.
abstract interface class LocaleRepositoryInterface {
  /// Saves the specified [locale] to persistent storage.
  ///
  /// Throws a [RepositoryException] if the operation fails.
  Future<void> saveLocale(Locale locale);

  /// Retrieves the saved [locale] from persistent storage.
  ///
  /// Returns `null` if no locale has been previously saved.
  Future<Locale?> getSavedLocale();
}
