import 'package:equatable/equatable.dart';
import '../../models/message.dart';

abstract class MessageState extends Equatable {
  const MessageState();

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

class MessageInitial extends MessageState {}

class MessageLoading extends MessageState {}

class MessagesLoaded extends MessageState {
  final List<Message> messages;
  final String groupId;

  const MessagesLoaded({
    required this.messages,
    required this.groupId,
  });

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

class MessageError extends MessageState {
  final String message;

  const MessageError(this.message);

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