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