Liferay.Loader.define("data-engine-js-components-web@1.0.87/js/custom/form-report/components/card/Card",["module","exports","require","@frontend-taglib-clay$clayui/card","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$react","../empty-state/EmptyState","../sidebar/SidebarContext","../summary/Summary"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Card({children:e,field:{icon:t,label:a,title:d},index:f,summary:s,totalEntries:y}){const{portletNamespace:m}=(0,n.useContext)(u.SidebarContext);return n.default.createElement("div",{className:"card-item",id:"".concat(m,"card_").concat(f)},n.default.createElement(i.default.Sheet,null,n.default.createElement(i.default.Col,null,n.default.createElement(r.default,{displayType:"image"},n.default.createElement(r.default.AspectRatio,{className:"card-header card-item-first"},n.default.createElement("div",{className:"aspect-ratio-item aspect-ratio-item-center-left aspect-ratio-item-fluid card-symbol card-type-asset-icon","data-tooltip-align":"bottom","data-tooltip-delay":300,title:d},n.default.createElement(l.default,{symbol:t})),n.default.createElement("div",{className:"field-info"},n.default.createElement(r.default.Description,{displayType:"title"},a),n.default.createElement(TotalEntriesLabel,{totalEntries:y})),!!Object.entries(s).length&&n.default.createElement(o.default,{summary:s})),n.default.createElement(r.default.Body,null,y>0?e:n.default.createElement(c.default,{description:Liferay.Language.get("entries-submitted-with-this-field-filled-will-show-up-here")}))))))};var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/card")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),i=_interopRequireDefault(a("@frontend-taglib-clay$clayui/layout")),n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),c=_interopRequireDefault(a("../empty-state/EmptyState")),u=a("../sidebar/SidebarContext"),o=_interopRequireDefault(a("../summary/Summary"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const TotalEntriesLabel=({totalEntries:e})=>{let t=Liferay.Language.get("there-are-no-entries");return 1===e&&(t="1 ".concat(Liferay.Language.get("entry").toLowerCase())),e>1&&(t="".concat(e," ").concat(Liferay.Language.get("entries").toLowerCase())),n.default.createElement(r.default.Description,{displayType:"text",truncate:!1},t)}}}));
//# sourceMappingURL=Card.js.map