Liferay.Loader.define("@liferay/object-web@1.0.153/js/components/ObjectDetails/EntryDisplayContainer",["module","exports","require","@frontend-taglib-clay$clayui/panel","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../../utils/constants"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.EntryDisplayContainer=function EntryDisplayContainer({errors:e,nonRelationshipObjectFieldsInfo:t,objectFields:n,setValues:o,values:u}){const[d,c]=(0,r.useState)(),f=(0,r.useMemo)((()=>t.map((({label:e,name:t})=>{var n;return{label:null!==(n=e[i.defaultLanguageId])&&void 0!==n?n:"",name:t}}))),[t]);return(0,r.useEffect)((()=>{if(u.titleObjectFieldName){const e=n.find((e=>e.name===u.titleObjectFieldName));return void c(e)}const e=n.find((e=>"id"===e.name));o({titleObjectFieldName:null==e?void 0:e.name}),c(e)}),[u.titleObjectFieldName,n]),r.default.createElement(a.default,{collapsable:!0,defaultExpanded:!0,displayTitle:Liferay.Language.get("entry-display"),displayType:"unstyled"},r.default.createElement(a.default.Body,null,r.default.createElement(l.SingleSelect,{error:e.titleObjectFieldId,label:Liferay.Language.get("title-object-field-id"),onChange:e=>{const t=n.find((({name:t})=>t===e.name));c(t),o({titleObjectFieldName:null==t?void 0:t.name})},options:f,value:null==d?void 0:d.label[i.defaultLanguageId]})))};var a=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n("@frontend-taglib-clay$clayui/panel")),l=n("@liferay/object-js-components-web"),r=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 n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var r=a?Object.getOwnPropertyDescriptor(e,l):null;r&&(r.get||r.set)?Object.defineProperty(n,l,r):n[l]=e[l]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),i=n("../../utils/constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}}}));
//# sourceMappingURL=EntryDisplayContainer.js.map