using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace GreenTree.Nachtragsmanagement.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.IgnoreRoute("{resource}.ashx/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Administration.Users",
                "admin/viewusers",
               new
               {
                   controller = "Admin",
                   action = "ViewUsers"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Administration.Roles",
                "admin/viewroles",
               new
               {
                   controller = "Admin",
                   action = "ViewRoles"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Administration.Plugins",
                "admin/viewplugins",
               new
               {
                   controller = "Admin",
                   action = "ViewPlugins"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Administration.AppInfo",
                "admin/viewappinfo",
               new
               {
                   controller = "Admin",
                   action = "ViewAppInfo"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Deviation.Deviations",
                "deviation/viewdeviations",
               new
               {
                   controller = "Deviation",
                   action = "ViewDeviations"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Deviation.Claims",
                "deviation/viewclaims",
               new
               {
                   controller = "Deviation",
                   action = "ViewClaims"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Appendix.Appendices",
                "appendix/viewappendices",
               new
               {
                   controller = "Appendix",
                   action = "ViewAppendices"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Appendix.Claims",
                "appendix/viewclaims",
               new
               {
                   controller = "Appendix",
                   action = "ViewClaims"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Site.Sites",
                "site/viewsites",
               new
               {
                   controller = "Site",
                   action = "ViewSites"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Misc.MailNotifications",
                "misc/viewmailnotifications",
               new
               {
                   controller = "Misc",
                   action = "ViewMailNotifications"
               },
               new[]
               {
                    "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Misc.HelpPages",
                "misc/viewhelppages",
               new
               {
                   controller = "Misc",
                   action = "ViewHelpPages"
               },
               new[]
               {
                    "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Misc.Logs",
                "misc/viewlogs",
               new
               {
                   controller = "Misc",
                   action = "ViewLogs"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );

            routes.MapRoute(
                "GreenTree.Nachtragsmanagement.Web.Misc.ConfigItems",
                "misc/viewconfigitems",
               new
               {
                   controller = "Misc",
                   action = "ConfigItems"
               },
               new[]
               {
                   "GreenTree.Nachtragsmanagement.Web.Controllers"
               }
            );
        }
    }
}