
import '../../api/apiResponse.dart';
import '../../api/mhsl/message/getMessages/getMessagesCache.dart';
import '../../api/mhsl/message/getMessages/getMessagesResponse.dart';
import '../dataHolder.dart';

class MessageProps extends DataHolder {
  GetMessagesResponse? _getMessagesResponse;
  GetMessagesResponse get getMessagesResponse => _getMessagesResponse!;

  @override
  List<ApiResponse?> properties() {
    return [_getMessagesResponse];
  }

  @override
  void run({renew}) {
    GetMessagesCache(
        renew: renew,
        onUpdate: (GetMessagesResponse data) => {
          _getMessagesResponse = data,
          notifyListeners(),
        }
    );
  }

}