{% extends "base.html" %}

{% block title %}Admin Dashboard - ScanLook{% endblock %}

{% block content %}
<div class="dashboard-container">
    <div class="dashboard-header" style="margin-top: var(--space-lg);">
        <div class="header-left" style="display: flex; align-items: center; gap: var(--space-md);">
            <a href="{{ url_for('home') }}" class="btn btn-secondary btn-sm" title="Back to Home">
                <i class="fa-solid fa-house"></i>
            </a>
            <h1 class="page-title" style="margin-bottom: 0;">Admin Dashboard</h1>
        </div>

    </div>

    <div class="modules-section">
        <h2 class="section-title">Modules</h2>
        
        {% if modules %}
        <div class="modules-grid">
            {% for module in modules %}
            <a href="/{{ module.module_key }}/admin" class="module-card module-card-link">
            <div class="module-icon">
                {% if module.icon %}
                    <i class="fa-solid {{ module.icon }}"></i>
                {% else %}
                    📦
                {% endif %}
            </div>
                <h3 class="module-name">{{ module.module_name }}</h3>
                <p class="module-desc">{{ module.description }}</p>
            </a>
            {% endfor %}
        </div>
        {% else %}
        <div class="alert alert-info">
            <i class="fa-solid fa-info-circle"></i> No modules installed yet.
            <a href="{{ url_for('module_manager_ui') }}">Install modules</a> to get started.
        </div>
        {% endif %}
    </div>
</div>
{% endblock %}