part of 'working_area_bloc.dart';

@immutable
class WorkingAreaState {
  final StateStatus status;
  final List<AreaItemState> areas;

  const WorkingAreaState({
    this.areas = const [],
    this.status = StateStatus.idle,
  });

  WorkingAreaState copyWith({
    List<AreaItemState>? areas,
    StateStatus? status,
  }) {
    return WorkingAreaState(
      areas: areas ?? this.areas,
      status: status ?? this.status,
    );
  }
}

class AreaItemState {
  final String id;
  final String name;
  final bool selected;

  AreaItemState({required this.id, required this.name, this.selected = false});

  AreaItemState copyWith({
    bool? selected,
  }) {
    return AreaItemState(
      id: id,
      name: name,
      selected: selected ?? this.selected,
    );
  }
}
