part of 'occupancy_bloc.dart';

enum OccupancyStatus { initial, loading, loaded, failure }

final class OccupancyState extends Equatable {
  const OccupancyState({
    this.chartData = const [],
    this.status = OccupancyStatus.initial,
    this.errorMessage,
  });

  final List<Occupacy> chartData;
  final OccupancyStatus status;
  final String? errorMessage;

  OccupancyState copyWith({
    List<Occupacy>? chartData,
    OccupancyStatus? status,
    String? errorMessage,
  }) {
    return OccupancyState(
      chartData: chartData ?? this.chartData,
      status: status ?? this.status,
      errorMessage: errorMessage ?? this.errorMessage,
    );
  }

  @override
  List<Object?> get props => [chartData, status, errorMessage];
}
