import 'dart:async';
import 'dart:convert';

import 'package:IQ/app/global/snono_encrypt.dart';
import 'package:IQ/app/modules/service/api_service.dart';

// ignore: prefer_typing_uninitialized_variables
var sendReplyTicketResponse;
bool getUserSendReplyTicketInformsLoads = false;
Future getUserSendReplyTicketInforms(
  int? ticketId,
  String? messageInput,
) async {
  String payload = AES.encrypt(
    data: jsonEncode({"message": messageInput}),
    passpharse: 'abcdefghijuklmno0123456789012345',
  );
  var value = await APIService.post('ticket/$ticketId', payload, true);
  sendReplyTicketResponse = value;
  getUserSendReplyTicketInformsLoads = true;
  return sendReplyTicketResponse;
}
