import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/regenerator";import{useState as n,useEffect as a}from"react";import{fetchWells as o}from"../utils/apiCalls.js";function i(i,s){var u=n(null),l=e(u,2),c=l[0],p=l[1];return a((function(){function e(){return(e=r(t.mark((function r(){var e;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!i){r.next=6;break}return r.next=3,o(i,s);case 3:r.t0=r.sent,r.next=7;break;case 6:r.t0=null;case 7:e=r.t0,p(e);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}p(null),function(){e.apply(this,arguments)}()}),[i]),c}export{i as useFetchWells};
