import 'package:freezed_annotation/freezed_annotation.dart';

import '../../../../../api/marianumcloud/talk/chat/get_chat_response.dart';

part 'chat_state.freezed.dart';
part 'chat_state.g.dart';

@freezed
abstract class ChatState with _$ChatState {
  const factory ChatState({
    @Default('') String currentToken,
    GetChatResponse? chatResponse,
    int? referenceMessageId,
    @Default(true) bool hasMoreOld,
    @Default(false) bool isLoadingOlder,
  }) = _ChatState;

  factory ChatState.fromJson(Map<String, Object?> json) =>
      _$ChatStateFromJson(json);
}
