Liferay.Loader.define("@liferay/object-js-components-web@1.0.58/components/SidePanelContent",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/label","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","./SidePanelContent.scss"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.closeSidePanel=closeSidePanel,t.saveAndReload=function saveAndReload(){const e=Liferay.Util.getOpener();closeSidePanel(),setTimeout((()=>{e.location.reload()}),300)},t.openToast=function openToast(e){Liferay.Util.getOpener().Liferay.Util.openToast(e)},t.SidePanelContent=SidePanelContent,t.SidePanelForm=function SidePanelForm({children:e,customLabel:t,onSubmit:a,readOnly:n,title:r}){return o.default.createElement(l.default,{onSubmit:a},o.default.createElement(SidePanelContent,{customLabel:t,readOnly:n,title:r},e))};var n=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={},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(a,l,r):a[l]=e[l]}a.default=e,t&&t.set(e,a);return a}(a("@frontend-taglib-clay$clayui/button")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/form")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/label")),i=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),o=_interopRequireDefault(a("liferay!frontend-js-react-web$react"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(this,arguments)}function closeSidePanel(){Liferay.Util.getOpener().Liferay.fire("close-side-panel")}function SidePanelContent({children:e,className:t,customLabel:a,onSave:l,readOnly:c,title:d}){const s=l?{onClick:l}:{type:"submit"};return o.default.createElement("div",{className:(0,i.default)("lfr-objects__side-panel-content",t)},o.default.createElement("div",{className:"lfr-objects__side-panel-content-header"},o.default.createElement("div",{className:"lfr-objects__side-panel-content-header-title"},o.default.createElement("h3",{className:"mb-0"},d),a&&o.default.createElement(r.default,{className:"lfr-objects__side-panel-content-header-title-label",displayType:null==a?void 0:a.displayType},null==a?void 0:a.message)),o.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("cancel"),displayType:"unstyled",monospaced:!1,onClick:closeSidePanel,symbol:"times"})),e,o.default.createElement(n.default.Group,{className:"lfr-objects__side-panel-content-container",spaced:!0},o.default.createElement(n.default,{displayType:"secondary",onClick:closeSidePanel},Liferay.Language.get("cancel")),o.default.createElement(n.default,_extends({disabled:c},s),Liferay.Language.get("save"))))}a("./SidePanelContent.scss")}}));
//# sourceMappingURL=SidePanelContent.js.map