import r from"@babel/runtime/helpers/defineProperty";import{some as e}from"lodash";import t from"./usePermissions.js";import n from"../components/LoadingIndicator/LoadingIndicator.js";import{jsx as o}from"react/jsx-runtime";function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var p=o(n,{}),u=function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(i){return function(u){var f=n.loader,a=void 0===f?p:f,s=n.skipLoading,m=void 0!==s&&s,O=Object.keys(r),b=t(O.map((function(e){var t=r[e];return"function"==typeof t?t(u):t})));if(!m&&e(b,"loading"))return a;var d=O.reduce((function(r,e,t){return r[e]=b[t].active,r}),{});return o(i,c(c({},u),d))}}};export{u as withPermissionsHOC};
//# sourceMappingURL=withPermissionsHOC.js.map
