Liferay.Loader.define("data-engine-js-components-web@1.0.87/js/custom/form-report/components/list/List",["module","exports","require","@frontend-taglib-clay$clayui/button","data-engine-js-components-web$moment/min/moment-with-locales","liferay!frontend-js-react-web$react","../../utils/data","../color/Color","../sidebar/SidebarContext"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function List({data:e,field:t,summary:r,totalEntries:c,type:d}){const{portletNamespace:s,toggleSidebar:f}=(0,o.useContext)(u.SidebarContext),formatDate=(e,t)=>{const r=themeDisplay.getLanguageId().split("_",1).join(""),a=(0,n.default)(e).locale(r).format("L");if(!t)return a;const o=(0,n.default)(e).locale(r).format("LT");return"".concat(a," ").concat(o)};return e=(0,l.removeEmptyValues)(e),o.default.createElement("div",{className:"field-list"},o.default.createElement("ul",{className:"entries-list"},Array.isArray(e)&&e.map(((e,t)=>o.default.createElement("li",{key:t},((e,t)=>{switch(t){case"color":return o.default.createElement(i.default,{hexColor:e});case"date":return formatDate(e);case"date_time":return formatDate(e,!0);default:return e}})(e,d)))),5===e.length&&c>5?o.default.createElement("li",{id:"".concat(s,"-see-more"),key:"see-more"},o.default.createElement(a.default,{displayType:"link",onClick:()=>f(t,r,c,d)},Liferay.Language.get("see-all-entries"))):null))};var a=_interopRequireDefault(r("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(r("data-engine-js-components-web$moment/min/moment-with-locales")),o=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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=a?Object.getOwnPropertyDescriptor(e,n):null;o&&(o.get||o.set)?Object.defineProperty(r,n,o):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),l=r("../../utils/data"),i=_interopRequireDefault(r("../color/Color")),u=r("../sidebar/SidebarContext");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}}}}));
//# sourceMappingURL=List.js.map