"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/toConsumableArray"),r=require("react"),t=require("lodash"),u=require("../utils/isAssetVisibleToUser.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e);exports.useWellsToDisplay=function(e,n,o,s,l,a){return r.useMemo((function(){if(!e)return e;var r=new Map((null==o?void 0:o.map((function(e){return[e.id,e]})))||[]),f=n.map((function(e){return r.get(e.id)||e})),d=new Set(e.map((function(e){return e.id}))),c=((null==s?void 0:s[l])||[]).map((function(e){return r.get(e)})).filter((function(e){return void 0!==e&&d.has(e.id)}));return t.uniqBy([].concat(i.default(f),i.default(c),i.default(e)),"id").filter((function(e){return u.isAssetVisibleToUser(e,a)}))}),[e,n,o,s,l,a])};
//# sourceMappingURL=useWellsToDisplay.js.map
