from django.templatetags.static import static

from django.utils.translation import gettext_lazy as _
from django.urls import reverse_lazy
from . import unfold_navigation as navigation

UNFOLD = {
    "SITE_TITLE": "Django Default",
    "SITE_HEADER": "Django Default",
    "SITE_URL": "/",
    "SITE_ICON": {
        "light": lambda request: static("images/django-logo.png"),
        "dark": lambda request: static("images/django-logo.png"),
    },
    "SITE_FAVICONS": [
        {
            "rel": "icon",
            "sizes": "32x32",
            "type": "image/svg+xml",
            "href": lambda request: static("images/django-logo.png"),
        },
    ],
    "SITE_SYMBOL": "speed",
    "SHOW_HISTORY": True,
    "SHOW_VIEW_ON_SITE": True,
    "LOGIN": {
        "image": lambda request: static("images/login.jpg"),
    },
    "STYLES": [
        lambda request: static("css/tailwind.css"),
    ],
    "COLORS": {
        "font": {
            "subtle-light": "107 114 128",
            "subtle-dark": "156 163 175",
            "default-light": "75 85 99",
            "default-dark": "209 213 219",
            "important-light": "17 24 39",
            "important-dark": "243 244 246",
        },
        "primary": {
            "50": "65 144 176",
            "100": "65 144 176",
            "200": "65 144 176",
            "300": "65 144 176",
            "400": "65 144 176",
            "500": "65 144 176",
            "600": "65 144 176",
            "700": "65 144 176",
            "800": "65 144 176",
            "900": "65 144 176",
            "950": "65 144 176",
        },
    },
    "EXTENSIONS": {
        "modeltranslation": {
            "flags": {
                "uz": "🇺🇿",
                "ru": "🇷🇺",
            },
        },
    },
    "SIDEBAR": {
        "show_search": True,
        "show_all_applications": True,
        "navigation": navigation.PAGES,
    },
    "TABS": [
        {
            "models": [
                "geology.geology",
                "geology.photo",
                "geology.category",
            ],
            "items": [
                {
                    "title": _("Madanlar"),
                    "link": reverse_lazy("admin:geology_geology_changelist"),
                },
                {
                    "title": _("Fotolar"),
                    "link": reverse_lazy("admin:geology_photo_changelist"),
                },
                {
                    "title": _("Kategoriyalar"),
                    "link": reverse_lazy("admin:geology_category_changelist"),
                },
            ],
        },
        {
            "models": [
                "geology.gallerycategory",
                "geology.gallery",
            ],
            "items": [
                {
                    "title": _("Galereya kategoriyalari"),
                    "link": reverse_lazy("admin:geology_gallerycategory_changelist"),
                },
                {
                    "title": _("Galereya"),
                    "link": reverse_lazy("admin:geology_gallery_changelist"),
                },
            ],
        },
    ],
}
