import 'shop_status.dart';

class ShopBlocState {
  final ShopLoadStatus loadStatus;
  final ShopActionStatus actionStatus;

  ShopBlocState({required this.loadStatus, required this.actionStatus});

  factory ShopBlocState.initial() =>
      ShopBlocState(loadStatus: ShopInitial(), actionStatus: ActionIdle());

  bool get busy => actionStatus is ActionLoading;

  ShopBlocState copyWith({
    ShopLoadStatus? loadStatus,
    ShopActionStatus? actionStatus,
  }) =>
      ShopBlocState(
        loadStatus: loadStatus ?? this.loadStatus,
        actionStatus: actionStatus ?? this.actionStatus,
      );
}
