Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/data_renderers/TooltipSummaryRenderer",["module","exports","require","@frontend-taglib-clay$clayui/icon","@liferay/frontend-js-react-web","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../utils/dataRenderers","../utils/index","./DefaultRenderer"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=d(r("@frontend-taglib-clay$clayui/icon")),a=r("@liferay/frontend-js-react-web"),l=d(r("liferay!frontend-js-react-web$classnames")),i=(d(r("liferay!frontend-js-react-web$prop-types")),d(r("liferay!frontend-js-react-web$react"))),o=r("../utils/dataRenderers"),c=r("../utils/index"),u=d(r("./DefaultRenderer"));function d(e){return e&&e.__esModule?e:{default:e}}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function m(e){let{contentRenderer:t,divider:r,highlighted:n,itemData:a,label:c,value:d}=e,f=p(e,["contentRenderer","divider","highlighted","itemData","label","value"]),s=u.default;return t&&(s=(0,o.getDataRendererById)(t)),i.default.createElement("tr",{className:(0,l.default)(r&&"with-divider",n&&"highlighted")},i.default.createElement("td",{className:"pr-3 table-column-text-start"},c),i.default.createElement("td",{className:"table-column-text-end text-right"},i.default.createElement(s,{itemData:a,options:f,value:d})))}var O=function({itemData:e,options:t,value:r}){var l;if(!r||!(null===(l=t.details)||void 0===l?void 0:l.rowsDefinitions))return null;const o=t.details.rowsDefinitions.reduce(((t,r)=>{const n=(0,c.getSchemaString)(e,r.valueFieldKey);return n&&t.push(b(b({},r),{},{value:n})),t}),[]);return i.default.createElement(i.default.Fragment,null,r,!!o.length&&i.default.createElement("span",{className:"fds-tooltip-summary","data-title-set-as-html":!0,"data-tooltip-delay":"0",title:a.ReactDOMServer.renderToString(i.default.createElement("table",{className:"tooltip-table"},i.default.createElement("tbody",null,o.map((e=>i.default.createElement(m,f({key:e.label},e)))))))},i.default.createElement(n.default,{symbol:"info-circle"})))};t.default=O}}));
//# sourceMappingURL=TooltipSummaryRenderer.js.map