Liferay.Loader.define("portal-search-ranking-web@3.0.53/js/components/PageToolbar.es",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/link","frontend-js-components-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/link")),l=a("frontend-js-components-web"),o=_interopRequireDefault(a("liferay!frontend-js-react-web$prop-types")),i=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 r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));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}}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}class PageToolbar extends i.Component{render(){const{inactive:e,onCancel:t,onChangeActive:a,onPublish:o,onSaveAsDraft:u,submitDisabled:c}=this.props;return i.default.createElement(l.ManagementToolbar.Container,{"aria-label":Liferay.Language.get("save"),className:"page-toolbar-root"},i.default.createElement(l.ManagementToolbar.ItemList,null,i.default.createElement(l.ManagementToolbar.Item,null,i.default.createElement("label",{className:"toggle-switch",htmlFor:"active-switch-input"},i.default.createElement("input",{checked:!e,className:"toggle-switch-check",id:"active-switch-input",onChange:a,type:"checkbox"}),i.default.createElement("span",{className:"toggle-switch-bar"},i.default.createElement("span",{className:"toggle-switch-handle"})),i.default.createElement("span",{className:"toggle-switch-text-right"},e?Liferay.Language.get("inactive"):Liferay.Language.get("active"))))),i.default.createElement(l.ManagementToolbar.ItemList,{expand:!0}),i.default.createElement(l.ManagementToolbar.ItemList,null,i.default.createElement(l.ManagementToolbar.Item,null,i.default.createElement(r.default,{displayType:"secondary",href:t,outline:"secondary"},Liferay.Language.get("cancel"))),u&&i.default.createElement(l.ManagementToolbar.Item,null,i.default.createElement(n.default,{displayType:"secondary",onClick:u,small:!0},Liferay.Language.get("save-as-draft"))),i.default.createElement(l.ManagementToolbar.Item,null,i.default.createElement(n.default,{disabled:c,onClick:o,small:!0,type:"submit"},Liferay.Language.get("save")))))}}_defineProperty(PageToolbar,"props",{inactive:o.default.bool,onCancel:o.default.string.isRequired,onChangeActive:o.default.func,onPublish:o.default.func.isRequired,onSaveAsDraft:o.default.func,submitDisabled:o.default.bool}),_defineProperty(PageToolbar,"defaultProps",{submitDisabled:!1});var u=PageToolbar;t.default=u}}));
//# sourceMappingURL=PageToolbar.es.js.map