"use strict";sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/core/UIComponent","sap/m/MessageBox","sap/ui/core/routing/History"],function(e,t,n,o){"use strict";const s=e.extend("com.optrabot.ui.controller.BaseController",{getOwnerComponent:function t(){return e.prototype.getOwnerComponent.call(this)},getRouter:function e(){return t.getRouterFor(this)},getResourceBundle:function e(){const t=this.getOwnerComponent().getModel("i18n");return t.getResourceBundle()},getBundleTextByModel:async function e(t,n,o){const s=await n.getResourceBundle();return s.getText(t,o)},getModel:function e(t){return this.getView().getModel(t)},setModel:function e(t,n){this.getView().setModel(t,n);return this},navTo:function e(t,n,o){this.getRouter().navTo(t,n,undefined,o)},onNavBack:function e(){const t=o.getInstance().getPreviousHash();if(t!==undefined){window.history.go(-1)}else{this.getRouter().navTo("main",{},undefined,true)}},showFunctionNotImplementedMessage:function e(){this.showMessage("FunctionNotImplemented","information")},showMessage:function e(t,o="information"){const s=this.getOwnerComponent().getModel("i18n");const r=s.getResourceBundle();const i=r.getText(t);switch(o){case"information":n.information(i);break;case"error":n.error(i);break;case"success":n.success(i);break}}});return s});
//# sourceMappingURL=BaseController.js.map