import 'package:syncrow_web/pages/spaces_management/all_spaces/model/subspace_model.dart';

class SubSpaceState {
  final List<SubspaceModel> subSpaces;
  final List<UpdateSubspaceModel> updatedSubSpaceModels;
  final String errorMessage;
  final Set<String> duplicates;

  SubSpaceState(
    this.subSpaces,
    this.updatedSubSpaceModels,
    this.errorMessage,
    this.duplicates,
  );

  SubSpaceState copyWith({
    List<SubspaceModel>? subSpaces,
    List<UpdateSubspaceModel>? updatedSubSpaceModels,
    String? errorMessage,
    Set<String>? duplicates,
  }) {
    return SubSpaceState(
      subSpaces ?? this.subSpaces,
      updatedSubSpaceModels ?? this.updatedSubSpaceModels,
      errorMessage ?? this.errorMessage,
      duplicates ?? this.duplicates,
    );
  }
}
