from django.urls import include, path, reverse
from django.utils.translation import gettext_lazy as _
from wagtail import hooks
from wagtail.admin.menu import MenuItem


@hooks.register("register_admin_urls")
def register_mobileapp_admin_urls():
    return [
        path(
            "mobile-app/",
            include("ocyan.plugin.mobileapp.admin_urls"),
        ),
    ]


@hooks.register("register_admin_menu_item")
def register_mobileapp_menu_item():
    return MenuItem(
        _("Mobile App"),
        reverse("mobileapp_admin:dashboard"),
        icon_name="site",
        order=320,
    )
