<layout name="admin" />

<div class="section">
    <h2>{{ title }}</h2>

    <div class="admin-card">
        <div class="admin-card__header">
            <h3 class="admin-card__title">General Information</h3>
        </div>
        <table-data source="general_info" type="phpinfo" container-class="admin-card" id="generalInfoTable" />
    </div>

    <div class="admin-card" style="margin-top: var(--space-lg);">
        <div class="admin-card__header">
            <h3 class="admin-card__title">Configuration</h3>
        </div>
        <table-data source="config_info" type="phpinfo" container-class="admin-card" id="configInfoTable" />
    </div>

    <div class="admin-card" style="margin-top: var(--space-lg);">
        <div class="admin-card__header">
            <h3 class="admin-card__title">Extensions</h3>
        </div>
        <div class="admin-card__content">
            <div style="margin-bottom: var(--space-md);">
                <div class="metric-card" style="display: inline-block; margin-right: var(--space-md);">
                    <div class="metric-card__value">{{ extensions_count }}</div>
                    <div class="metric-card__label">Total Extensions</div>
                </div>
            </div>

            <div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-sm);">
                <for var="extension" in="extensions_list">
                    <div style="padding: var(--space-sm); background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem;">
                        {{ extension }}
                    </div>
                </for>
            </div>
        </div>
    </div>
</div>

<style>
.metric-card {
    text-align: center;
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-alt);
}

.metric-card__value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--primary);
}

.metric-card__label {
    color: var(--muted);
    font-size: 0.875rem;
}
</style>