Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectView/Views",["module","exports","require","@liferay/frontend-data-set-web","@liferay/object-js-components-web","liferay!frontend-js-react-web$react","../../utils/fds"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Views({apiURL:e,creationMenu:t,formName:r,id:c,items:l,objectDefinitionExternalReferenceCode:f,style:u,url:b}){const[d,s]=(0,o.useState)();(0,o.useEffect)((()=>{(async()=>{const e=await n.API.getObjectDefinitionByExternalReferenceCode(f);s(e.defaultLanguageId)})()}),[f]);const y=_objectSpread(_objectSpread({},i.defaultDataSetProps),{},{apiURL:e,creationMenu:t,customDataRenderers:{objectLayoutDefaultDataRenderer:function objectLayoutDefaultDataRenderer({itemData:e}){return e.defaultObjectView?Liferay.Language.get("yes"):Liferay.Language.get("no")},objectLayoutLabelDataRenderer:function objectLayoutLabelDataRenderer({itemData:e,openSidePanel:t,value:r}){return o.default.createElement("div",{className:"table-list-title"},o.default.createElement("a",{href:"#",onClick:()=>{t({url:(0,i.formatActionURL)(b,e.id)})}},(0,n.getLocalizableLabel)(d,r)))}},formName:r,id:c,itemsActions:l,namespace:"_com_liferay_object_web_internal_object_definitions_portlet_ObjectDefinitionsPortlet_",portletId:"com_liferay_object_web_internal_object_definitions_portlet_ObjectDefinitionsPortlet",style:u,views:[{contentRenderer:"table",label:"Table",name:"table",schema:{fields:[{contentRenderer:"objectLayoutLabelDataRenderer",expand:!1,fieldName:"name",label:Liferay.Language.get("label"),localizeLabel:!0,sortable:!0},{contentRenderer:"objectLayoutDefaultDataRenderer",expand:!1,fieldName:"defaultObjectLayout",label:Liferay.Language.get("default"),localizeLabel:!0,sortable:!1}]},thumbnail:"table"}]});return o.default.createElement(a.FrontendDataSet,y)};var a=r("@liferay/frontend-data-set-web"),n=r("@liferay/object-js-components-web"),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")),i=r("../../utils/fds");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}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}}}));
//# sourceMappingURL=Views.js.map