/// Provider: Selected Brand Provider
///
/// Manages the currently selected brand filter state.
library;

import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'selected_brand_provider.g.dart';

/// Selected Brand Provider
///
/// Stores the currently selected brand ID for filtering products.
/// Default: 'all' (no brand filter)
///
/// Usage:
/// ```dart
/// // Watch selected brand
/// final selectedBrand = ref.watch(selectedBrandProvider);
///
/// // Update selected brand
/// ref.read(selectedBrandProvider.notifier).updateBrand('VASTA');
/// ```
@riverpod
class SelectedBrand extends _$SelectedBrand {
  @override
  String build() {
    return 'all'; // Default: show all brands
  }

  /// Update the selected brand
  void updateBrand(String brandId) {
    state = brandId;
  }

  /// Reset to default (all brands)
  void reset() {
    state = 'all';
  }
}
