var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.USER=exports.REGISTER_MOTOR=exports.PHONE=exports.OCR_V3=exports.OCR_V2=exports.OCR_V1=exports.NATIONAL_ID=exports.LOAN_DATA=exports.INTRO=void 0;exports.clear=clear;exports.load=load;exports.loadString=loadString;exports.remove=remove;exports.save=save;exports.saveString=saveString;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncStorage=_interopRequireDefault(require("@react-native-async-storage/async-storage"));var USER=exports.USER='USER';var LOAN_DATA=exports.LOAN_DATA='LOAN_DATA';var NATIONAL_ID=exports.NATIONAL_ID='NATIONAL_ID';var REGISTER_MOTOR=exports.REGISTER_MOTOR='REGISTER_MOTOR';var INTRO=exports.INTRO='INTRO';var PHONE=exports.PHONE='PHONE';var OCR_V1=exports.OCR_V1="OCR_V1";var OCR_V2=exports.OCR_V2="OCR_V2";var OCR_V3=exports.OCR_V3="OCR_V3";function loadString(key){var _t;return _regenerator.default.async(function(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=1;return _regenerator.default.awrap(_asyncStorage.default.getItem(key));case 1:return _context.abrupt("return",_context.sent);case 2:_context.prev=2;_t=_context["catch"](0);return _context.abrupt("return",null);case 3:case"end":return _context.stop();}},null,null,[[0,2]],Promise);}function saveString(key,value){var _t2;return _regenerator.default.async(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.prev=0;_context2.next=1;return _regenerator.default.awrap(_asyncStorage.default.setItem(key,value));case 1:return _context2.abrupt("return",true);case 2:_context2.prev=2;_t2=_context2["catch"](0);return _context2.abrupt("return",false);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);}function load(key){var almostThere,_t3;return _regenerator.default.async(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.prev=0;_context3.next=1;return _regenerator.default.awrap(_asyncStorage.default.getItem(key));case 1:almostThere=_context3.sent;return _context3.abrupt("return",JSON.parse(almostThere));case 2:_context3.prev=2;_t3=_context3["catch"](0);return _context3.abrupt("return",null);case 3:case"end":return _context3.stop();}},null,null,[[0,2]],Promise);}function save(key,value){var _t4;return _regenerator.default.async(function(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.prev=0;_context4.next=1;return _regenerator.default.awrap(_asyncStorage.default.setItem(key,JSON.stringify(value)));case 1:return _context4.abrupt("return",true);case 2:_context4.prev=2;_t4=_context4["catch"](0);return _context4.abrupt("return",false);case 3:case"end":return _context4.stop();}},null,null,[[0,2]],Promise);}function remove(key){var _t5;return _regenerator.default.async(function(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.prev=0;_context5.next=1;return _regenerator.default.awrap(_asyncStorage.default.removeItem(key));case 1:_context5.next=3;break;case 2:_context5.prev=2;_t5=_context5["catch"](0);case 3:case"end":return _context5.stop();}},null,null,[[0,2]],Promise);}function clear(){var _t6;return _regenerator.default.async(function(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.prev=0;_context6.next=1;return _regenerator.default.awrap(_asyncStorage.default.clear());case 1:_context6.next=3;break;case 2:_context6.prev=2;_t6=_context6["catch"](0);case 3:case"end":return _context6.stop();}},null,null,[[0,2]],Promise);}
//# sourceMappingURL=storage.js.map