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 addedTicketResponse;
bool getUseraddedTicketInformsLoads = false;
Future getUseraddedTicketInforms(
  String? subjectInput,
  String? messageInput,
) async {
  String payload = AES.encrypt(
    data: jsonEncode({"subject": subjectInput, "message": messageInput}),
    passpharse: 'abcdefghijuklmno0123456789012345',
  );
  var value = await APIService.post('ticket', payload, true);
  addedTicketResponse = value;
  getUseraddedTicketInformsLoads = true;
  return addedTicketResponse;
}
