"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/regenerator"),n=require("react"),u=require("../utils/apiCalls.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),s=a(t),i=a(r);exports.useFetchWells=function(e,t){var r=n.useState(null),a=s.default(r,2),c=a[0],f=a[1];return n.useEffect((function(){function r(){return(r=l.default(i.default.mark((function r(){var n;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e){r.next=6;break}return r.next=3,u.fetchWells(e,t);case 3:r.t0=r.sent,r.next=7;break;case 6:r.t0=null;case 7:n=r.t0,f(n);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}f(null),function(){r.apply(this,arguments)}()}),[e]),c};
