var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _initializerDefineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/initializerDefineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _applyDecoratedDescriptor2=_interopRequireDefault(require("@babel/runtime/helpers/applyDecoratedDescriptor"));var _initializerWarningHelper2=_interopRequireDefault(require("@babel/runtime/helpers/initializerWarningHelper"));var _mobx=require("mobx");var _api=require("../../services/api");var _class,_descriptor;var Store=(_class=function(){function Store(){(0,_classCallCheck2.default)(this,Store);(0,_initializerDefineProperty2.default)(this,"verify",_descriptor,this);}return(0,_createClass2.default)(Store,[{key:"checkQualify",value:function checkQualify(loanId,onSuccess,onFailed){var response,_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(_api.Api.getInstance().checkQualifyLoanbriefId(loanId));case 1:response=_context.sent;console.log(response);if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{if(onFailed)onFailed();}}else{if(onFailed)onFailed();}_context.next=3;break;case 2:_context.prev=2;_t=_context["catch"](0);console.log(_t);case 3:case"end":return _context.stop();}},null,null,[[0,2]],Promise);}},{key:"postQualify",value:function postQualify(body,onSuccess,onFailed){var response,_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(_api.Api.getInstance().postQualifyLoanbriefId(body));case 1:response=_context2.sent;console.log(response);if(response.kind==='ok'){if(response.data.meta.errorCode===200){if(onSuccess)onSuccess(response.data.data);}else{if(onFailed)onFailed();}}else{if(onFailed)onFailed();}_context2.next=3;break;case 2:_context2.prev=2;_t2=_context2["catch"](0);console.log(_t2);case 3:case"end":return _context2.stop();}},null,null,[[0,2]],Promise);}}]);}(),_descriptor=(0,_applyDecoratedDescriptor2.default)(_class.prototype,"verify",[_mobx.observable],{configurable:true,enumerable:true,writable:true,initializer:function initializer(){return null;}}),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"checkQualify",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"checkQualify"),_class.prototype),(0,_applyDecoratedDescriptor2.default)(_class.prototype,"postQualify",[_mobx.action],Object.getOwnPropertyDescriptor(_class.prototype,"postQualify"),_class.prototype),_class);var qualifyStore=new Store();var _default=exports.default=qualifyStore;
//# sourceMappingURL=Store.js.map