part of 'home_bloc.dart';

class HomeStateData {
  final List<BannerData> banners;
  final List<IntellectualTypeData> intellectualTypes;
  final List<CategoriesData> categories;
  final List<ProductData> productNewIdeas;
  // final List<ProductData> productAll;

  HomeStateData({
    this.banners = const [],
    this.intellectualTypes = const [],
    this.categories = const [],
    this.productNewIdeas = const [],
    // this.productAll = const [],
  });

  HomeStateData copyWith({
    List<BannerData>? newBanners,
    List<IntellectualTypeData>? newIntellectualTypes,
    List<CategoriesData>? newCategories,
    List<ProductData>? newProductNewIdeas,
    // List<ProductData>? newProductAll,
  }) {
    return HomeStateData(
      banners: newBanners ?? this.banners,
      intellectualTypes: newIntellectualTypes ?? this.intellectualTypes,
      categories: newCategories ?? this.categories,
      productNewIdeas: newProductNewIdeas ?? this.productNewIdeas,
      // productAll: newProductAll ?? this.productAll,
    );
  }
}

abstract class HomeState {
  final HomeStateData data;

  HomeState(this.data);
}

class LoadingState extends HomeState {
  LoadingState(super.data);
}

class GetDataSuccessState extends HomeState {
  GetDataSuccessState(super.data);
}

class GetDataFailState extends HomeState {
  GetDataFailState(super.data);
}
