"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.USER = exports.TOKEN = exports.LANG = void 0;
exports.clearAll = clearAll;
exports.load = load;
exports.save = save;
var _index = require("../index");
const TOKEN = 'TOKEN';
exports.TOKEN = TOKEN;
const USER = 'USER';
exports.USER = USER;
const LANG = 'LANG';
exports.LANG = LANG;
async function load(key) {
  let user = await _index.chatVT.AsyncStorage.getItem(key);
  if (user !== undefined && user !== null) {
    return JSON.parse(user);
  } else {
    return null;
  }
}
async function save(key, data) {
  await _index.chatVT.AsyncStorage.setItem(key, JSON.stringify(data));
}
function clearAll() {
  _index.chatVT.AsyncStorage.clear();
}
//# sourceMappingURL=MyAsyncStorage.js.map