Liferay.Loader.define("@liferay/content-dashboard-web@2.0.69/js/transformers/ActionsComponentPropsTransformer",["module","exports","require","@liferay/frontend-js-react-web","../components/SidebarPanel","../components/SidebarPanelInfoView/SidebarPanelInfoView","../components/SidebarPanelInfoView/SidebarPanelInfoViewCollapsable","../components/SidebarPanelMetricsView"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{items:t,portletNamespace:n}=e;return f(f({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["items","portletNamespace"])),{},{items:t.map((e=>f(f({},e),{},{onClick(t){var r;const o=null===(r=e.data)||void 0===r?void 0:r.action;o&&(t.preventDefault(),m[o]({fetchURL:e.data.fetchURL,portletNamespace:n,rowId:e.data.classPK}))}})))})};var r=n("@liferay/frontend-js-react-web"),o=l(n("../components/SidebarPanel")),a=l(n("../components/SidebarPanelInfoView/SidebarPanelInfoView")),c=l(n("../components/SidebarPanelInfoView/SidebarPanelInfoViewCollapsable")),i=l(n("../components/SidebarPanelMetricsView"));function l(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const e=e=>{document.querySelectorAll('[data-searchcontainerid="'.concat(e,'content"] tr.active')).forEach((e=>e.classList.remove("active")))},d=(e,t)=>document.querySelector('[data-searchcontainerid="'.concat(e,'content"] [data-rowid="').concat(t,'"]')),u=(t,n)=>{e(t);d(t,n).classList.add("active")},b=({View:t,fetchURL:n,portletNamespace:a})=>{const c="".concat(a,"sidebar"),i=Liferay.component(c);if(i)i.open(n,t);else{const i=document.body.appendChild(document.createElement("div"));(0,r.render)(o.default,{fetchURL:n,onClose:()=>{Liferay.component(c).close(),e(a)},ref:e=>{Liferay.component(c,e)},viewComponent:t},i)}},m={showInfo({fetchURL:e,portletNamespace:t,rowId:n}){u(t,n),b({View:Liferay.FeatureFlags["LPS-161013"]?a.default:c.default,fetchURL:e,portletNamespace:t})},showMetrics({fetchURL:e,portletNamespace:t,rowId:n}){u(t,n),b({View:i.default,fetchURL:e,portletNamespace:t})}}}}));
//# sourceMappingURL=ActionsComponentPropsTransformer.js.map