Liferay.Loader.define("@liferay/object-web@1.0.132/js/utils/filter",["module","exports","require"],(function(e,t,r){window;{function ownKeys(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 _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function getSystemFieldLabelFromEntry(e,t,r){if("creator"===e){const{name:e}=t.creator;return _objectSpread(_objectSpread({},r),{},{label:e})}if("status"===e){const{label_i18n:e}=t.status;return _objectSpread(_objectSpread({},r),{},{label:e})}return _objectSpread(_objectSpread({},r),{},"createDate"===e?{label:t.dateCreated}:"modifiedDate"===e?{label:t.dateModified}:{label:t[e]})}Object.defineProperty(t,"__esModule",{value:!0}),t.getCheckedWorkflowStatusItems=function getCheckedWorkflowStatusItems(e,t){let r=[];const n=t();return r=e.map((e=>{const t={checked:!1,label:e.label,value:e.value};return(null==n?void 0:n.includes(Number(e.value)))&&(t.checked=!0),t})),r},t.getCheckedPickListItems=function getCheckedPickListItems(e,t){let r=[];const n=t();return r=e.map((e=>{const t={checked:!1,label:e.name,value:e.key};return(null==n?void 0:n.includes(e.key))&&(t.checked=!0),t})),r},t.getSystemFieldLabelFromEntry=getSystemFieldLabelFromEntry,t.getCheckedRelationshipItems=function getCheckedRelationshipItems(e,t,r,n,c){let o=[];const l=c();return o=e.map((e=>{let c={checked:!1,value:n?String(e.id):e.externalReferenceCode};return c=r?getSystemFieldLabelFromEntry(t,e,c):_objectSpread(_objectSpread({},c),{},{label:e[t]}),l.includes(e.externalReferenceCode)&&(c.checked=!0),c})),o}}}));
//# sourceMappingURL=filter.js.map