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

namespace Nop.Plugin.Misc.AgeVerification
{
    public class RouteProvider : IRouteProvider
    {
        public void RegisterRoutes(IEndpointRouteBuilder endpointRouteBuilder)
        {
            endpointRouteBuilder.MapControllerRoute(
                name: "AgeVerification",
                pattern: "Plugins/AgeVerification/Popup",
                defaults: new { controller = "AgeVerification", action = "Popup" }
            );
        }

        public int Priority => 0;
    }
}