Liferay.Loader.define("data-engine-js-components-web@1.0.75/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({data:e,field:t,summary:r,totalEntries:u,type:s}){const{portletNamespace:f,toggleSidebar:d}=(0,o.useContext)(c.SidebarContext),m=(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 m(e);case"date_time":return m(e,!0);default:return e}})(e,s)))),5===e.length&&u>5?o.default.createElement("li",{id:"".concat(f,"-see-more"),key:"see-more"},o.default.createElement(a.default,{displayType:"link",onClick:()=>d(t,r,u,s)},Liferay.Language.get("see-all-entries"))):null))};var a=s(r("@frontend-taglib-clay$clayui/button")),n=s(r("data-engine-js-components-web$moment/min/moment-with-locales")),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();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=s(r("../color/Color")),c=r("../sidebar/SidebarContext");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=List.js.map