import e from"@babel/runtime/helpers/toConsumableArray";import{useCallback as n}from"react";var t=function(t){var r=t.pads,l=t.onOffsetWellIdsSelect,a=t.selectedOffsetWellIds,i=t.allWellIds;return{handleSelectPads:n((function(e){return l(e?i:[])}),[i,l]),handleSelectPad:n((function(e,n){var t=r.find((function(n){return n.id.toString()===e.toString()})).wells.map((function(e){return e.id}));if(n){var i=a.concat(t);l(i)}else{var o=a.filter((function(e){return!(null!=t&&t.includes(e))}));l(o)}}),[r,a,l]),handleSelectWellId:n((function(n,t){if(t){var r=[].concat(e(a),[n]);l(r)}else{var i=a.filter((function(e){return e!==n}));l(i)}}),[a,l])}};export{t as usePadTableHandlers};
//# sourceMappingURL=usePadTableHandlers.js.map
