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

abstract class AssignTagState extends Equatable {
  const AssignTagState();

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

class AssignTagInitial extends AssignTagState {}

class AssignTagLoading extends AssignTagState {}

class AssignTagLoaded extends AssignTagState {
  final List<Tag> tags;
  final List<Tag> updatedTags;

  final bool isSaveEnabled;
  final String? errorMessage;

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

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

class AssignTagError extends AssignTagState {
  final String errorMessage;

  const AssignTagError(this.errorMessage);

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