# 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/models.py
# class MenuModel(models.Model, MenuMixin):
#     title = models.CharField(max_length=500)
#     program_name = models.CharField(max_length=255, unique=True)
# 
#     @property
#     def items(self):
#         return self.menuitemmodel_set.select_related('parent')
# 
#     def __str__(self):
#         return f'{self.title} [{self.program_name}]'


from datetime import datetime, timedelta
from django.contrib import auth, messages
from django.shortcuts import render
from django import forms
from django.http import JsonResponse
from django.urls import reverse_lazy
from adminlte_base import MenuLoader, MenuItem, Message, Notification, Task, Dropdown, ThemeColor
from adminlte_full.adminlte import manager
from adminlte_full.models import MenuModel



def index(request):
    messages.debug(request, f'Test: {getattr(manager, "test", None)}')
    messages.debug(request, '%s SQL statements were executed.' % 666)
    messages.info(request, 'Three credits remain in your account.')
    messages.success(request, 'Profile details updated.')
    messages.warning(request, 'Your account expires in three days.')
    messages.error(request, 'Document deleted.')
    return render(request, 'adminlte_full/base.html')
    # return render(request, 'breadcrumbs_demo.html')


def profile(request):
    return render(request, 'adminlte_full/base.html')


def terms(request):
    return render(request, 'terms.html')


@manager.menu_loader
class MyMenuLoader(MenuLoader):
    def __call__(self, program_name):

# 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/models.py
# class MenuModel(models.Model, MenuMixin):
#     title = models.CharField(max_length=500)
#     program_name = models.CharField(max_length=255, unique=True)
# 
#     @property
#     def items(self):
#         return self.menuitemmodel_set.select_related('parent')
# 
#     def __str__(self):
#         return f'{self.title} [{self.program_name}]'


# Path: example/demo/views.py
from datetime import datetime, timedelta
from django.contrib import auth, messages
from django.shortcuts import render
from django import forms
from django.http import JsonResponse
from django.urls import reverse_lazy
from adminlte_base import MenuLoader, MenuItem, Message, Notification, Task, Dropdown, ThemeColor
from adminlte_full.adminlte import manager
from adminlte_full.models import MenuModel




def index(request):
    messages.debug(request, f'Test: {getattr(manager, "test", None)}')
    messages.debug(request, '%s SQL statements were executed.' % 666)
    messages.info(request, 'Three credits remain in your account.')
    messages.success(request, 'Profile details updated.')
    messages.warning(request, 'Your account expires in three days.')
    messages.error(request, 'Document deleted.')
    return render(request, 'adminlte_full/base.html')
    # return render(request, 'breadcrumbs_demo.html')


def profile(request):
    return render(request, 'adminlte_full/base.html')


def terms(request):
    return render(request, 'terms.html')


@manager.menu_loader
class MyMenuLoader(MenuLoader):
    def __call__(self, program_name):

        return MenuModel.objects.get(program_name=program_name)