﻿/**
 * @author min.da
 * @since 2015-12-07
 */
define(['durandal/app', 'plugins/router'], function (app, router) {
    return {
        router: router,
        publish: function (action) {
            app.trigger('action:event', action);
        },
        activate: function () {
            return router.map([
                { "route": ["", "pay"],                          "moduleId": "apitools/index",                "title": "结算平台API",           "nav": 1 },
                { "route": "recharge",                          "moduleId": "apitools/index",                "title": "游戏充值中心API",           "nav": 2 },
                { "route": "interface",                          "moduleId": "apitools/index",                "title": "通行证API",           "nav": 3 }
            ]).buildNavigationModel()
              .mapUnknownRoutes('apitools/index', 'not-found')
              .activate();
        }
    };
});