import{useEffect as o}from"react";import{toArray as r,isArray as i,mapValues as t}from"lodash";import n from"./PermissionsContext.js";function s(s){var e=n(),m=e.permissions,a=e.fetchPermissions,f=r(s);o((function(){a(f)}),[f.join()]);var c=function(o){return m[o]||{active:!1,loading:!0}};return i(s)?s.map(c):t(s,c)}export{s as default};
