using Microsoft.AspNetCore.Routing;
using Nop.Web.Framework.Mvc.Routing;
using Microsoft.AspNetCore.Builder;
using Nop.Web.Framework;

namespace Nop.Plugin.SigmaSolve.StyleEditor.Infrastructure
{
    public partial class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(IRouteBuilder routeBuilder)
        {
            /*  routeBuilder.MapRoute("Nop.Plugin.SigmaSolve.StyleEditor.Generic",
                  "Plugins/StyleEditor/{action=Index}",
             new { controller = "StyleEditor" });*/


            //PDT
            /*routeBuilder.MapRoute("Nop.Plugin.SigmaSolve.StyleEditor.Index", "Plugins/StyleEditor/Index",
                 new { controller = "StyleEditor", action = "Index" });*/

            routeBuilder.MapRoute("Nop.Plugin.SigmaSolve.StyleEditor.Index", "Admin/StyleEditor/{action=Index}",
               new { controller = "StyleEditor", area = AreaNames.Admin });
            /* routeBuilder.MapRoute(
             "Nop.Plugin.SigmaSolve.StyleEditor", // Route name
             "Admin/Plugins/StyleEditor/{action}/{id}", // URL with parameters
             new { controller = "Home", action = "Index" },// Parameter defaults
             new[] { "Nop.Plugin.SigmaSolve.StyleEditor.Controllers" }

         );*/
            /* routeBuilder.MapRoute(
                 name: "Nop.Plugin.SigmaSolve.StyleEditor",
                 template: "convention/{action}",
                 defaults: new { controller = "StyleEditor", action = "Index" }
                 );*/
        }

        public int Priority => 100;

    }
}
