Liferay.Loader.define("@liferay/object-web@1.0.181/js/components/ObjectAction/Actions",["module","exports","require","@liferay/frontend-data-set-web","@liferay/object-js-components-web","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../utils/fds"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function Actions({apiURL:e,creationMenu:t,formName:a,id:l,items:f,objectDefinitionExternalReferenceCode:s,style:u,url:b}){const[d,p]=(0,o.useState)();(0,o.useEffect)((()=>{(async()=>{const e=await n.API.getObjectDefinitionByExternalReferenceCode(s);p(e.defaultLanguageId)})()}),[s]);const y=_objectSpread(_objectSpread({},c.defaultDataSetProps),{},{apiURL:e,creationMenu:t,customDataRenderers:{objectActionActiveDataRenderer:function objectActionActiveDataRenderer({itemData:e}){return e.active?Liferay.Language.get("yes"):Liferay.Language.get("no")},objectActionLabelDataRenderer:function objectActionLabelDataRenderer({itemData:e,openSidePanel:t,value:a}){return o.default.createElement("div",{className:"table-list-title"},o.default.createElement("a",{href:"#",onClick:()=>{t({url:(0,c.formatActionURL)(b,e.id)})}},(0,n.getLocalizableLabel)(d,a)))},objectActionLastExecutionDataRenderer:function objectActionLastExecutionDataRenderer({itemData:e}){return o.default.createElement("strong",{className:(0,i.default)("label","never-ran"===e.status.label?"label-info":"failed"===e.status.label?"label-danger":"label-success")},"never-ran"===e.status.label?Liferay.Language.get("never-ran"):"failed"===e.status.label?Liferay.Language.get("failed"):Liferay.Language.get("success"))}},formName:a,id:l,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:"objectActionLabelDataRenderer",expand:!1,fieldName:"label",label:Liferay.Language.get("label"),localizeLabel:!0,sortable:!0},{expand:!1,fieldName:"description",label:Liferay.Language.get("description"),localizeLabel:!0,sortable:!1},{contentRenderer:"objectActionActiveDataRenderer",expand:!1,fieldName:"active",label:Liferay.Language.get("active"),localizeLabel:!0,sortable:!1},{contentRenderer:"objectActionLastExecutionDataRenderer",expand:!1,fieldName:"status",label:Liferay.Language.get("last-execution"),localizeLabel:!0,sortable:!1}]},thumbnail:"table"}]});return o.default.createElement(r.FrontendDataSet,y)};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-react-web$classnames")),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")),c=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}}}));
//# sourceMappingURL=Actions.js.map