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