// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.
define(['hp/core/Router'],
function (router) { "use strict";

    var AuthnRoutes = ( function() {

        var CHANGE_CONTAINER = '#hp-change-page-container';
        var AUTH_CATEGORY = 'appliance';

        function AuthnRoutes() {

            var registered = false;

            this.register = function () {

                if (registered) {return;}
                registered = true;
                    router.map('add directory', '/settings/directory/add$', {
                    container: CHANGE_CONTAINER,
                    authCategory: AUTH_CATEGORY,
                    enter: function (location, result) {
                        require(['text!fsPages/settings/authentication/addDirectory.html',
                            'fs/view/settings/authentication/AuthnAddDirectoryView'],
                        function (page, view) {
                            result.loadIfManageable(page, view, AUTH_CATEGORY);
                        });
                    }
                });
            };
        }

        return new AuthnRoutes();
    }());

    return AuthnRoutes;
});
