part of 'favorites_bloc.dart';

class FavoritesStateData {
  final List<ProductFavoriteData> favs;

  FavoritesStateData({
    this.favs = const [],
  });

  FavoritesStateData copyWith({
    List<ProductFavoriteData>? newFavs,
  }) =>
      FavoritesStateData(favs: newFavs ?? this.favs);
}

abstract class FavoritesState {
  final FavoritesStateData data;

  FavoritesState(this.data);
}

class InitialState extends FavoritesState {
  InitialState(super.data);
}

class GetFavoritesSuccessState extends FavoritesState {
  GetFavoritesSuccessState(super.data);
}

class GetFavoritesFailState extends FavoritesState {
  GetFavoritesFailState(super.data);
}

class SelectedFavoriteState extends FavoritesState {
  final int productId;

  SelectedFavoriteState(super.data, this.productId);
}
