import r from"@babel/runtime/helpers/toConsumableArray";import{useMemo as t}from"react";import{uniqBy as n}from"lodash";import{isAssetVisibleToUser as i}from"../utils/isAssetVisibleToUser.js";var e=function(e,o,u,f,a,m){return t((function(){if(!e)return e;var t=new Map((null==u?void 0:u.map((function(r){return[r.id,r]})))||[]),l=o.map((function(r){return t.get(r.id)||r})),c=new Set(e.map((function(r){return r.id}))),p=((null==f?void 0:f[a])||[]).map((function(r){return t.get(r)})).filter((function(r){return void 0!==r&&c.has(r.id)}));return n([].concat(r(l),r(p),r(e)),"id").filter((function(r){return i(r,m)}))}),[e,o,u,f,a,m])};export{e as useWellsToDisplay};
//# sourceMappingURL=useWellsToDisplay.js.map
