"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ErrorHandler_1 = require("./ErrorHandler");
const Cloudwise_1 = require("./Cloudwise");
const Configuration_1 = require("./Configuration");
const Debug_1 = require("./Debug");
var _started = false;
exports.ApplicationHandler = {
    startup(options) {
        if (!_started) {
            if (options !== undefined) {
                Configuration_1.Configuration.setConfiguration(options);
                Debug_1.Debug.log("Configuration set: " + JSON.stringify(options));
            }
            else {
                Debug_1.Debug.log("Configuration set: " + JSON.stringify(Configuration_1.Configuration.loadConfiguration()));
            }
            ErrorHandler_1.ErrorHandler(Cloudwise_1.Cloudwise, Debug_1.Debug).registerErrorHandler();
            _started = true;
        }
    },
};
