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

abstract class AssignTagModelState extends Equatable {
  const AssignTagModelState();

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

class AssignTagModelInitial extends AssignTagModelState {}

class AssignTagModelLoading extends AssignTagModelState {}

class AssignTagModelLoaded extends AssignTagModelState {
  final List<Tag> tags;
  final bool isSaveEnabled;
  final String? errorMessage;

  final List<Tag> updatedTags;

  const AssignTagModelLoaded({
    required this.tags,
    required this.isSaveEnabled,
    required this.updatedTags,
    this.errorMessage,
  });

  @override
  List<Object?> get props => [tags, updatedTags, isSaveEnabled, errorMessage];
}

class AssignTagModelError extends AssignTagModelState {
  final String errorMessage;

  const AssignTagModelError(this.errorMessage);

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