# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):
# 
# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):


from hashlib import md5
    from urllib import urlencode
    from urllib.parse import urlencode
from adminlte_base import filters
from django import template
from django.template import Node
from django.template.base import TemplateSyntaxError, kwarg_re
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from ..adminlte import config
from ..adminlte import manager

@register.simple_tag(
    name='adminlte.menu.sidebar_menu',
    takes_context=True
)
def sidebar_menu(context):
    """Creates and returns a sidebar menu."""
    return manager.with_context(context).menu.sidebar_menu()


@register.inclusion_tag(
    name='adminlte.render_flash_messages',
    filename='adminlte_full/markup/flash_messages.html',
    takes_context=True
)
def render_flash_messages(context):
    """Displays popup messages by category."""
    return {'messages': manager.with_context(context).get_flash_messages()}


@register.inclusion_tag(
    name='adminlte.render_legacy_user_menu',
    filename='adminlte_full/markup/legacy_user_menu.html',
    takes_context=True
)
def render_legacy_user_menu(context):
    """Displays the user menu in the navigation bar in the AdminLTE2 style."""
    return {
        'config': config,
        'user': context['user'],

# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):
# 
# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):


# Path: adminlte_full/templatetags/adminlte_full.py
from hashlib import md5
    from urllib import urlencode
    from urllib.parse import urlencode
from adminlte_base import filters
from django import template
from django.template import Node
from django.template.base import TemplateSyntaxError, kwarg_re
from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from ..adminlte import config
from ..adminlte import manager


@register.simple_tag(
    name='adminlte.menu.sidebar_menu',
    takes_context=True
)
def sidebar_menu(context):
    """Creates and returns a sidebar menu."""
    return manager.with_context(context).menu.sidebar_menu()


@register.inclusion_tag(
    name='adminlte.render_flash_messages',
    filename='adminlte_full/markup/flash_messages.html',
    takes_context=True
)
def render_flash_messages(context):
    """Displays popup messages by category."""
    return {'messages': manager.with_context(context).get_flash_messages()}


@register.inclusion_tag(
    name='adminlte.render_legacy_user_menu',
    filename='adminlte_full/markup/legacy_user_menu.html',
    takes_context=True
)
def render_legacy_user_menu(context):
    """Displays the user menu in the navigation bar in the AdminLTE2 style."""
    return {
        'config': config,
        'user': context['user'],

        'profile_url': reverse_lazy(config['ADMINLTE_PROFILE_ENDPOINT']),