//@ui5-bundle com/optrabot/ui/Component-preload.js
sap.ui.require.preload({
	"com/optrabot/ui/Component.js":function(){
"use strict";sap.ui.define(["sap/ui/core/UIComponent","./model/models","sap/ui/Device","sap/ui/model/json/JSONModel"],function(t,e,i,n){"use strict";function s(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const o=s(e);const a=t.extend("com.optrabot.ui.Component",{metadata:{manifest:"json"},init:async function e(){t.prototype.init.call(this);this.setModel(o.createDeviceModel(),"device");var i=new n;this.setModel(i,"control");await this.initializeGlobalModel();this.getRouter().initialize()},initializeGlobalModel:async function t(){var e=window.environment||"PROD";var i="";i=window.location.origin;if(e!=="PROD"){i=i.slice(0,i.lastIndexOf(":"));i=i+":8080"}const s={backendBaseUrl:i,appVersion:"1.0.0"};const o=new n(s);this.setModel(o,"global")},getContentDensityClass:function t(){if(this.contentDensityClass===undefined){if(document.body.classList.contains("sapUiSizeCozy")||document.body.classList.contains("sapUiSizeCompact")){this.contentDensityClass=""}else if(!i.support.touch){this.contentDensityClass="sapUiSizeCompact"}else{this.contentDensityClass="sapUiSizeCozy"}}return this.contentDensityClass}});return a});
},
	"com/optrabot/ui/controller/App.controller.js":function(){
"use strict";sap.ui.define(["./BaseController","sap/ui/Device"],function(t,e){"use strict";function o(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const n=o(t);const i=n.extend("com.optrabot.ui.controller.App",{onInit:function t(){this.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass());if(e.resize.width<=1024){this.onSideNavButtonPress()}},getBundleText:function t(e,o){return Promise.resolve(this.getBundleTextByModel(e,this.getOwnerComponent().getModel("i18n"),o))},onSideNavButtonPress:function t(){console.log("SideNavButton pressed");const e=this.byId("optrabot_app");var o=e.getSideExpanded();e.setSideExpanded(!o);this._setToggleButtonTooltip(!o)},_setToggleButtonTooltip:async function t(e){const o=this.byId("sideNavigationToggleButton");if(e){o.setTooltip(await this.getBundleText("sideNavigationCollapseTooltip"))}else{o.setTooltip(await this.getBundleText("sideNavigationExpandTooltip"))}}});return i});
},
	"com/optrabot/ui/controller/BaseController.js":function(){
"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){let o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"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});
},
	"com/optrabot/ui/controller/Main.controller.js":function(){
"use strict";sap.ui.define(["sap/m/MessageBox","./BaseController"],function(e,o){"use strict";function t(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}const n=t(o);const s=n.extend("com.optrabot.ui.controller.Main",{sayHello:function o(){e.show("Hello World!")}});return s});
},
	"com/optrabot/ui/controller/NotFound.controller.js":function(){
"use strict";sap.ui.define(["./BaseController"],function(t){"use strict";function n(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const e=n(t);const o=e.extend("com.optrabot.ui.controller.NotFoundController",{onInit:function t(){}});return o});
},
	"com/optrabot/ui/controller/TradeTemplateDetail.controller.js":function(){
"use strict";sap.ui.define(["./BaseController","sap/ui/model/json/JSONModel","sap/m/MessageBox"],function(t,e,o){"use strict";function a(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const l=a(t);const n=l.extend("com.optrabot.ui.controller.TradeTemplateDetail",{onInit:function t(){var o=this.getOwnerComponent();this.oRouter=o.getRouter();this.oControlModel=o.getModel("control");this.oViewModel=new e({template:null,editable:false});this.getView().setModel(this.oViewModel,"viewModel");this.oRouter.getRoute("template").attachPatternMatched(this._onTemplateMatched,this);this.oRouter.getRoute("templateWOLayout").attachPatternMatched(this._onTemplateMatched,this)},onEditToggleButtonPress:function t(){this.showFunctionNotImplementedMessage();return;var e=this.getView().byId("TemplatePageLayout");var o=e.getShowFooter();e.setShowFooter(!o)},loadTemplateDetails:async function t(){try{const t=this.getOwnerComponent().getModel("global");const e=t.getProperty("/backendBaseUrl");const o=await fetch(`${e}/api/templates/`+this._template);if(!o.ok){throw new Error("Failed to fetch template details")}console.log("Template details loaded");const a=await o.json();this.oViewModel.setProperty("/template",a)}catch(t){o.error("Failed to load template details: "+t.message)}},_onTemplateMatched:function t(e){console.log("Template matched");this._template=e.getParameter("arguments").template||this._template||"0";var o=e.getParameter("arguments").layout||"TwoColumnsMidExpanded";this.oControlModel.setProperty("/currentLayout",o);this.loadTemplateDetails()},onFullscreenPressed:function t(){var e=this.oControlModel.getProperty("/currentLayout");var o=e;if(e==="MidColumnFullScreen"){o="TwoColumnsMidExpanded"}else if(e==="TwoColumnsMidExpanded"){o="MidColumnFullScreen"}this.oRouter.navTo("template",{layout:o,template:this._template},true)},onClosePressed:function t(){this.oRouter.navTo("templates",{layout:"OneColumn"},true)},onExit:function t(){this.oRouter.getRoute("template").detachPatternMatched(this._onTemplateMatched,this);this.oRouter.getRoute("templateWOLayout").detachPatternMatched(this._onTemplateMatched,this)}});return n});
},
	"com/optrabot/ui/controller/TradeTemplateList.controller.js":function(){
"use strict";sap.ui.define(["./BaseController","sap/ui/model/json/JSONModel","sap/m/MessageBox"],function(e,t,o){"use strict";function n(e){return e&&e.__esModule&&typeof e.default!=="undefined"?e.default:e}const s=n(e);const a=s.extend("com.optrabot.ui.controller.TradeTemplateList",{onInit:function e(){this.oView=this.getView();this.oRouter=this.getOwnerComponent().getRouter();this.oViewModel=new t({TemplateCollection:[]});this.oView.setModel(this.oViewModel,"tradetemplates");this.loadTemplates()},loadTemplates:async function e(){try{const e=this.getOwnerComponent().getModel("global");const t=e.getProperty("/backendBaseUrl");const o=await fetch(`${t}/api/templates/`);if(!o.ok){throw new Error("Failed to fetch templates")}const n=await o.json();this.oViewModel.setProperty("/TemplateCollection",n)}catch(e){o.error("Failed to load templates: "+e.message)}},onAdd:function e(){this.showFunctionNotImplementedMessage()},onTemplatePress:function e(t){var o=this.oView.getParent().getParent();o.setLayout("TwoColumnsMidExpanded");var n=t.getSource().getBindingContext("tradetemplates").getPath();var s=n.split("/").slice(-1).pop();console.log("Template name: "+s);this.oRouter.navTo("template",{layout:"TwoColumnsMidExpanded",template:s})}});return a});
},
	"com/optrabot/ui/controller/TradeTemplates.controller.js":function(){
"use strict";sap.ui.define(["./BaseController"],function(t){"use strict";function e(t){return t&&t.__esModule&&typeof t.default!=="undefined"?t.default:t}const o=e(t);const n=o.extend("com.optrabot.ui.controller.TradeTemplates",{onInit:function t(){console.log("TradeTemplates controller initialized");this.oOwnerComponent=this.getOwnerComponent();this.oRouter=this.oOwnerComponent.getRouter();this.oRouter.attachRouteMatched(this.onRouteMatched,this);this.oControlModel=this.oOwnerComponent.getModel("control")},onRouteMatched:function t(e){const o=e.getParameter("name");const n=e.getParameter("arguments");this.sCurrentRouteName=o;this.sCurrentTemplate=n.template;var r="";if(!n.layout&&this.sCurrentTemplate){r="TwoColumnsMidExpanded"}else{r=n.layout||"OneColumn"}this.getView().byId("flexibleColumnLayout").setLayout(r)},onStateChange:function t(e){console.log("State change event triggered")},onExit:function t(){}});return n});
},
	"com/optrabot/ui/i18n/i18n.properties":'appTitle=com.optrabot.ui\nappDescription=UI5 Application com.optrabot.ui\nbtnText=Say Hello\n',
	"com/optrabot/ui/i18n/i18n_de.properties":'appTitle=OptraBot\nappDescription=OptraBot UI\n\nsideContentDashboard=\\u00dcbersicht\nsideContentTemplates=Trade Vorlagen\nsideContentSettings=Einstellungen\nsideNavigationCollapseTooltip=Men\\u00fc einklappen\nsideNavigationExpandTooltip=Men\\u00fc ausklappen\n\ncloseButtonTooltip=Schlie\\u00dfen\n\nbtnEdit=Bearbeiten\nbtnSave=Speichern\nbtnCancel=Abbrechen\n\nbtnInactive=Inaktiv\nbtnActive=Aktiv\n\nStatus=Status\nTradeTemplate=Vorlage\n\nFunctionNotImplemented=Diese Funktion ist noch nicht implementiert!\n\nsectionTitleBasicInfo=Basisinformationen',
	"com/optrabot/ui/i18n/i18n_en.properties":'appTitle=OptraBot\nappDescription=OptraBot UI\n\nsideContentDashboard=Dashboard\nsideContentTemplates=Trade Templates\nsideContentSettings=Einstellungen\nsideNavigationCollapseTooltip=Collapse Menu\nsideNavigationExpandTooltip=Expand Menu\n\ncloseButtonTooltip=Close\n\nbtnEdit=Edit\nbtnSave=Save\nbtnCancel=Cancel\n\nbtnInactive=Inactive\nbtnActive=Active\n\nStatus=Status\nTradeTemplate=Template\n\nFunctionNotImplemented=This function is not implemented yet!\n\nsectionTitleBasicInfo=Basic Information',
	"com/optrabot/ui/manifest.json":'{"_version":"1.12.0","sap.app":{"id":"com.optrabot.ui","type":"application","i18n":"i18n/i18n.properties","title":"{{appTitle}}","description":"{{appDescription}}","applicationVersion":{"version":"1.0.0"}},"sap.ui":{"technology":"UI5","icons":{},"deviceTypes":{"desktop":true,"tablet":true,"phone":true}},"sap.ui5":{"rootView":{"viewName":"com.optrabot.ui.view.App","type":"XML","async":true,"id":"app"},"dependencies":{"minUI5Version":"1.132.1","libs":{"sap.ui.core":{},"sap.m":{},"sap.f":{}}},"handleValidation":true,"contentDensities":{"compact":true,"cozy":true},"models":{"i18n":{"type":"sap.ui.model.resource.ResourceModel","settings":{"bundleName":"com.optrabot.ui.i18n.i18n"}},"side":{"type":"sap.ui.model.json.JSONModel","uri":"model/sideContent.json"},"tradetemplates":{"type":"sap.ui.model.json.JSONModel","uri":"model/tradetemplates.json"}},"resources":{"css":[{"uri":"css/style.css"}]},"routing":{"config":{"routerClass":"sap.m.routing.Router","type":"View","viewType":"XML","viewPath":"com.optrabot.ui.view","controlId":"app","controlAggregation":"pages","async":true},"routes":[{"pattern":"","name":"main","target":"main"},{"pattern":"templates","name":"templates","target":"templates"},{"pattern":"template/{template}/{layout}","name":"template","target":["templates"]},{"pattern":"template/{template}","name":"templateWOLayout","target":["templates"]},{"pattern":"main","name":"main","target":"main"},{"pattern":"{all*}","name":"notFound","target":"notFound"}],"targets":{"main":{"viewId":"main","viewName":"Main"},"templates":{"viewId":"templates","viewName":"TradeTemplates"},"notFound":{"viewId":"notFound","viewName":"NotFound"}}}}}',
	"com/optrabot/ui/model/formatter.js":function(){
"use strict";sap.ui.define([],function(){"use strict";var e={formatValue:e=>e?.toUpperCase()};return e});
},
	"com/optrabot/ui/model/models.js":function(){
"use strict";sap.ui.define(["sap/ui/model/json/JSONModel","sap/ui/model/BindingMode","sap/ui/Device"],function(e,i,n){"use strict";var s={createDeviceModel:()=>{const s=new e(n);s.setDefaultBindingMode(i.OneWay);return s}};return s});
},
	"com/optrabot/ui/view/App.view.xml":'<mvc:View\n\tcontrollerName="com.optrabot.ui.controller.App"\n\tdisplayBlock="true"\n\txmlns="sap.m"\n\txmlns:tnt="sap.tnt"\n\txmlns:mvc="sap.ui.core.mvc"><tnt:ToolPage id="optrabot_app" class="optrabotToolPage"><tnt:header><tnt:ToolHeader><Button\n\t\t\t\t\tid="sideNavigationToggleButton"\n\t\t\t\t\ticon="sap-icon://menu2"\n\t\t\t\t\ttype="Transparent"\n\t\t\t\t\tpress=".onSideNavButtonPress"\n\t\t\t\t\ttooltip="{i18n>sideNavigationCollapseTooltip}"><layoutData><OverflowToolbarLayoutData priority="NeverOverflow"/></layoutData></Button><ToolbarSpacer /><Image height="1.5rem" class="sapUiSmallMarginBegin" src="img/logo-optrabot-dark.png"/><Title text="{i18n>appTitle}" level="H1"/><ToolbarSpacer /></tnt:ToolHeader></tnt:header><tnt:sideContent><tnt:SideNavigation expanded="true" selectedKey="{side>/selectedKey}"><tnt:NavigationList\n\t\t\t\t\titems="{\n\t\t\t\t\t\tpath: \'side>/navigation\',\n\t\t\t\t\t\ttemplateShareable: false\n\t\t\t\t\t}"><tnt:NavigationListItem\n\t\t\t\t\t\ttext="{path: \'side>titleI18nKey\', formatter: \'.getBundleText\'}"\n\t\t\t\t\t\ticon="{side>icon}"\n\t\t\t\t\t\texpanded="{side>expanded}"\n\t\t\t\t\t\tkey="{side>key}"\n\t\t\t\t\t\thref="#/{side>key}"></tnt:NavigationListItem></tnt:NavigationList><tnt:fixedItem><tnt:NavigationList\n\t\t\t\t\t\titems="{\n\t\t\t\t\t\t\tpath: \'side>/fixedNavigation\',\n\t\t\t\t\t\t\ttemplateShareable: false\n\t\t\t\t\t\t}"><tnt:NavigationListItem\n\t\t\t\t\t\t\ttext="{path: \'side>titleI18nKey\', formatter: \'.getBundleText\'}"\n\t\t\t\t\t\t\ticon="{side>icon}"\n\t\t\t\t\t\t\tkey="{side>key}"\n\t\t\t\t\t\t\thref="#/{side>key}"></tnt:NavigationListItem></tnt:NavigationList></tnt:fixedItem></tnt:SideNavigation></tnt:sideContent><tnt:mainContents><App id="app" /></tnt:mainContents></tnt:ToolPage></mvc:View>\n',
	"com/optrabot/ui/view/Main.view.xml":'<mvc:View\n\tcontrollerName="com.optrabot.ui.controller.Main"\n\tdisplayBlock="true"\n\txmlns="sap.m"\n\txmlns:mvc="sap.ui.core.mvc"\n\txmlns:core="sap.ui.core"\n\tcore:require="{\n\t\tformatter: \'com/optrabot/ui/model/formatter\'\n\t}"></mvc:View>\n',
	"com/optrabot/ui/view/NotFound.view.xml":'<mvc:View\n   controllerName="com.optrabot.ui.controller.NotFound"\n   xmlns="sap.m"\n   xmlns:mvc="sap.ui.core.mvc"><MessagePage\n      title="Not found"\n      text="Sorry, but the requested resource is not available."\n      description="Please check the URL and try again."/></mvc:View>',
	"com/optrabot/ui/view/TradeTemplateDetail.view.xml":'<mvc:View\n\tcontrollerName="com.optrabot.ui.controller.TradeTemplateDetail"\n\txmlns="sap.uxap"\n\txmlns:mvc="sap.ui.core.mvc"\n\txmlns:layout="sap.ui.layout"\n\txmlns:m="sap.m"><ObjectPageLayout id="TemplatePageLayout"\n\t\tshowTitleInHeaderContent="true"\n\t\tshowEditHeaderButton="true"\n\t\teditHeaderButtonPress="handleEditBtnPress"\n\t\theaderContentPinnable="false"\n\t\tupperCaseAnchorBar="false"><headerTitle><ObjectPageDynamicHeaderTitle><snappedHeading><m:HBox><m:Title text="{viewModel>/template/Name}" wrapping="true"/></m:HBox></snappedHeading><expandedHeading><m:HBox><m:Title text="{viewModel>/template/Name}" wrapping="true"/></m:HBox></expandedHeading><navigationActions><m:OverflowToolbarButton \n\t\t\t\t\t\ticon="sap-icon://full-screen"\n\t\t\t\t\t\tpress=".onFullscreenPressed"\n\t\t\t\t\t\ttooltip="Fullscreen Display"\n\t\t\t\t\t\tvisible="{= ${control>/currentLayout} !== \'MidColumnFullScreen\' }"/><m:OverflowToolbarButton\n\t\t\t\t\t\ticon="sap-icon://exit-full-screen"\n\t\t\t\t\t\tpress=".onFullscreenPressed"\n\t\t\t\t\t\ttooltip="Exit Fullscreen Display"\n\t\t\t\t\t\tvisible="{= ${control>/currentLayout} === \'MidColumnFullScreen\' }"/><m:OverflowToolbarButton\n\t\t\t\t\t\ticon="sap-icon://decline"\n\t\t\t\t\t\tpress=".onClosePressed"\n\t\t\t\t\t\ttooltip="{i18n>closeButtonTooltip}"/></navigationActions><actions><m:ToggleButton\n\t\t\t\t\t\ttext="{i18n>btnEdit}"\n\t\t\t\t\t\ttype="Emphasized"\n\t\t\t\t\t\tpress=".onEditToggleButtonPress"/></actions></ObjectPageDynamicHeaderTitle></headerTitle><headerContent><m:FlexBox wrap="NoWrap" fitContainer="true" alignItems="Start" justifyContent="SpaceBetween"><m:Text text="{viewModel>/template/Strategy}"/><m:ObjectStatus\n\t\t\t\t\t\t\ttext="{= ${viewModel>/template/Enabled} ? ${i18n>btnActive} : ${i18n>btnInactive}}"\n\t\t\t\t\t\t\tstate="{= ${viewModel>/template/Enabled} ? \'Success\' : \'Error\'}"/></m:FlexBox></headerContent><sections></sections><footer><m:OverflowToolbar><m:ToolbarSpacer/><m:Button type="Accept" text="{i18n>btnSave}"/><m:Button type="Reject" text="{i18n>btnCancel}"/></m:OverflowToolbar></footer></ObjectPageLayout></mvc:View>',
	"com/optrabot/ui/view/TradeTemplateList.view.xml":'<mvc:View\n\tcontrollerName="com.optrabot.ui.controller.TradeTemplateList"\n\txmlns:f="sap.f"\n\txmlns="sap.m"\n\txmlns:mvc="sap.ui.core.mvc"><f:DynamicPage id="dynamicPageId" toggleHeaderOnTitleClick="false"><f:title><f:DynamicPageTitle><f:heading><Title text="{i18n>sideContentTemplates}"/></f:heading><f:actions><Button icon="sap-icon://add" type="Transparent" press=".onAdd"/></f:actions></f:DynamicPageTitle></f:title><f:content><VBox fitContainer="true"><List id="templatesList" \n\t\t\t\t\titems="{path: \'tradetemplates>/TemplateCollection\'}"><ObjectListItem\n\t\t\t\t\t\ttitle="{tradetemplates>Name}"\n\t\t\t\t\t\ttype="Navigation"\n\t\t\t\t\t\tpress=".onTemplatePress"><firstStatus><ObjectStatus\n\t\t\t\t\t\t\t\ttext="{= ${tradetemplates>Enabled} ? ${i18n>btnActive} : ${i18n>btnInactive} }"\n\t\t\t\t\t\t\t\tstate="{= ${tradetemplates>Enabled} ? \'Success\' : \'Error\'}"\n\t\t\t\t\t\t\t\tinverted="true"/></firstStatus><ObjectAttribute text="{tradetemplates>Strategy}" /></ObjectListItem></List></VBox></f:content></f:DynamicPage></mvc:View>',
	"com/optrabot/ui/view/TradeTemplates.view.xml":'<mvc:View\n\tcontrollerName="com.optrabot.ui.controller.TradeTemplates"\n\txmlns="sap.m"\n\txmlns:f="sap.f"\n\txmlns:mvc="sap.ui.core.mvc"><f:FlexibleColumnLayout id="flexibleColumnLayout" backgroundDesign="Solid" stateChange=".onStateChanged"><f:beginColumnPages><mvc:XMLView id="beginView" viewName="com.optrabot.ui.view.TradeTemplateList"/></f:beginColumnPages><f:midColumnPages><mvc:XMLView id="detailView" viewName="com.optrabot.ui.view.TradeTemplateDetail"/></f:midColumnPages></f:FlexibleColumnLayout></mvc:View>'
});
//# sourceMappingURL=Component-preload.js.map
