import 'package:equatable/equatable.dart';
import 'package:zhiying_base_widget/widgets/custom/slide_banner/model/custom_slide_banner_model.dart';

abstract class CustomSlideBannerState extends Equatable {
  const CustomSlideBannerState();

  @override
  List<Object> get props => [];
}

/// 初始化状态
class InitialCustomSlideBannerState extends CustomSlideBannerState {
  @override
  List<Object> get props => [];
}

/// 缓存数据
class CustomSlideBannerCachedState extends CustomSlideBannerState {
  CustomSlideBannerModel datas;

  CustomSlideBannerCachedState({this.datas});

  @override
  List<Object> get props => [this.datas];
}

/// 数据加载完毕状态
class HomeSlideBannerLoadedState extends CustomSlideBannerState {
  CustomSlideBannerModel datas;

  HomeSlideBannerLoadedState({this.datas});

  HomeSlideBannerLoadedState copyWith({CustomSlideBannerModel newData}) {
    return HomeSlideBannerLoadedState(
      datas: newData ?? datas,
    );
  }

  @override
  List<Object> get props => [datas];
}

/// 数据加载失败
class HomeSlideBannerLoadError extends CustomSlideBannerState {}
