Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectValidation/Validations",["module","exports","require","@liferay/frontend-data-set-web","@liferay/object-js-components-web","liferay!frontend-js-dependencies-web$moment/min/moment-with-locales","liferay!frontend-js-react-web$react","../../utils/fds"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Validations({apiURL:t,creationMenu:a,formName:c,id:d,items:f,objectDefinitionExternalReferenceCode:b,style:u,url:s}){const[p,y]=(0,o.useState)();(0,o.useEffect)((()=>{(async()=>{const e=await n.API.getObjectDefinitionByExternalReferenceCode(b);y(e.defaultLanguageId)})()}),[b]);const j=_objectSpread(_objectSpread({},l.defaultDataSetProps),{},{apiURL:t,creationMenu:a,customDataRenderers:{objectFieldActiveDataRenderer:function objectFieldActiveDataRenderer({itemData:e}){return e.active?Liferay.Language.get("yes"):Liferay.Language.get("no")},objectFieldLabelDataRenderer:function objectFieldLabelDataRenderer({itemData:e,openSidePanel:t,value:a}){return o.default.createElement("div",{className:"table-list-title"},o.default.createElement("a",{href:"#",onClick:()=>{t({url:(0,l.formatActionURL)(s,e.id)})}},(0,n.getLocalizableLabel)(p,a)))},objectFieldModifiedDateDataRenderer:function objectFieldModifiedDateDataRenderer(){return i.default.locale(e),(0,i.default)().format("MMMM D, YYYY, h:mm:ss A")}},formName:c,id:d,itemsActions:f,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:"objectFieldLabelDataRenderer",expand:!1,fieldName:"name",label:Liferay.Language.get("label"),localizeLabel:!0,sortable:!0},{expand:!1,fieldName:"engineLabel",label:Liferay.Language.get("type"),localizeLabel:!0,sortable:!1},{contentRenderer:"objectFieldActiveDataRenderer",expand:!1,fieldName:"active",label:Liferay.Language.get("active"),localizeLabel:!0,sortable:!1},{contentRenderer:"objectFieldModifiedDateDataRenderer",expand:!1,fieldName:"dateModified",label:Liferay.Language.get("modified-date"),localizeLabel:!0,sortable:!1}]},thumbnail:"table"}]});return o.default.createElement(r.FrontendDataSet,j)};var r=a("@liferay/frontend-data-set-web"),n=a("@liferay/object-js-components-web"),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("liferay!frontend-js-dependencies-web$moment/min/moment-with-locales")),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 a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=r?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(a,n,i):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),l=a("../../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 a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0).forEach((function(t){_defineProperty(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const e=Liferay.ThemeDisplay.getBCP47LanguageId()}}));
//# sourceMappingURL=Validations.js.map