Liferay.Loader.define("data-engine-js-components-web@1.0.107/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,i.useContext)(u.SidebarContext);return i.default.createElement("div",{className:"card-item",id:"".concat(m,"card_").concat(f)},i.default.createElement(n.default.Sheet,null,i.default.createElement(n.default.Col,null,i.default.createElement(r.default,{displayType:"image"},i.default.createElement(r.default.AspectRatio,{className:"card-header card-item-first"},i.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},i.default.createElement(l.default,{symbol:t})),i.default.createElement("div",{className:"field-info",tabIndex:0},i.default.createElement(r.default.Description,{displayType:"title"},a),i.default.createElement(TotalEntriesLabel,{totalEntries:y})),!!Object.entries(s).length&&i.default.createElement(o.default,{summary:s})),i.default.createElement(r.default.Body,null,y>0?e:i.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")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/layout")),i=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 n=r?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(a,l,n):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())),i.default.createElement(r.default.Description,{displayType:"text",truncate:!1},t)}}}));
//# sourceMappingURL=Card.js.map