Liferay.Loader.define("@liferay/object-js-components-web@1.0.58/components/ManagementToolbar/index",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/management-toolbar","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$react","./index.scss","./ModalEditExternalReferenceCode"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.ManagementToolbar=function ManagementToolbar({backURL:e,badgeClassName:a,badgeLabel:t,className:u,enableBoxShadow:f=!0,entityId:m,externalReferenceCode:y,externalReferenceCodeSaveURL:g,hasPublishPermission:b,hasUpdatePermission:p,helpMessage:E,isApproved:v,label:C,loading:x,onExternalReferenceCodeChange:L,onGetEntity:R,onSubmit:h,portletNamespace:_,screenNavigationCategoryKey:w,showEntityDetails:j=!0}){const[N,M]=(0,i.useState)(y),[q,$]=(0,i.useState)(!1),{observer:O,onClose:P}=(0,c.useModal)({onClose:()=>$(!1)});return i.default.createElement(i.default.Fragment,null,i.default.createElement(r.default,{className:(0,o.default)("lfr__management-toolbar ".concat(u),f&&"lfr__management-toolbar--box-shadow")},i.default.createElement(r.default.ItemList,null,i.default.createElement("div",{className:"border-right ml-sm-2 mr-3 pr-3"},i.default.createElement("h3",{className:"mb-0 text-truncate"},C),t&&i.default.createElement("strong",{className:"".concat(a," label")},t)),j&&i.default.createElement("div",null,i.default.createElement("div",null,i.default.createElement("span",{className:"text-secondary"},"".concat(Liferay.Language.get("id"),":")),i.default.createElement("strong",{className:"ml-2"},m)),i.default.createElement("div",{className:"mt-1"},i.default.createElement("span",{className:"text-secondary"},"".concat(Liferay.Language.get("erc"),":")),i.default.createElement("strong",{className:"ml-2"},N),i.default.createElement("span",{className:"ml-3 text-secondary",title:E},i.default.createElement(l.default,{symbol:"question-circle"})),i.default.createElement(n.default,{"aria-label":(0,d.sub)(Liferay.Language.get("edit-x"),Liferay.Language.get("external-reference-code")),className:"ml-3 p-0 text-secondary",displayType:"unstyled",onClick:()=>$(!0)},i.default.createElement(l.default,{symbol:"pencil"}))))),(!w||"details"===w)&&i.default.createElement(r.default.ItemList,null,i.default.createElement(n.default.Group,{key:1,spaced:!0},i.default.createElement(n.default,{displayType:"secondary",id:"".concat(_,"cancel"),name:"cancel",onClick:()=>(0,d.navigate)(e)},Liferay.Language.get("cancel")),i.default.createElement(n.default,{disabled:!p||x,displayType:v||void 0===v?"primary":"secondary",id:"".concat(_,"save"),name:"save",onClick:()=>h(!0)},Liferay.Language.get("save")),void 0!==v&&!v&&i.default.createElement(n.default,{disabled:!b||x,id:"".concat(_,"publish"),name:"publish",onClick:()=>h(!1)},Liferay.Language.get("publish"))))),q&&i.default.createElement(s.ModalEditExternalReferenceCode,{externalReferenceCode:N,helpMessage:E,observer:O,onClose:P,onExternalReferenceCodeChange:L,onGetEntity:R,saveURL:g,setExternalReferenceCode:M}))};var n=_interopRequireDefault(t("@frontend-taglib-clay$clayui/button")),l=_interopRequireDefault(t("@frontend-taglib-clay$clayui/icon")),r=_interopRequireDefault(t("@frontend-taglib-clay$clayui/management-toolbar")),c=t("@frontend-taglib-clay$clayui/modal"),o=_interopRequireDefault(t("liferay!frontend-js-react-web$classnames")),d=t("frontend-js-web"),i=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=_getRequireWildcardCache();if(a&&a.has(e))return a.get(e);var t={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var r=n?Object.getOwnPropertyDescriptor(e,l):null;r&&(r.get||r.set)?Object.defineProperty(t,l,r):t[l]=e[l]}t.default=e,a&&a.set(e,t);return t}(t("liferay!frontend-js-react-web$react"));t("./index.scss");var s=t("./ModalEditExternalReferenceCode");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=index.js.map