part of 'communities_tree_selection_bloc.dart';

final class CommunitiesTreeSelectionState extends Equatable {
  const CommunitiesTreeSelectionState({
    this.selectedCommunity,
    this.selectedSpace,
  });

  final CommunityModel? selectedCommunity;
  final SpaceModel? selectedSpace;

  CommunitiesTreeSelectionState copyWith({
    CommunityModel? selectedCommunity,
    SpaceModel? selectedSpace,
    List<CommunityModel>? expandedCommunities,
    List<SpaceModel>? expandedSpaces,
  }) {
    return CommunitiesTreeSelectionState(
      selectedCommunity: selectedCommunity ?? this.selectedCommunity,
      selectedSpace: selectedSpace ?? this.selectedSpace,
    );
  }

  @override
  List<Object?> get props => [
        selectedCommunity,
        selectedSpace,
      ];
  }
