{#
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2025 The Linux Foundation
#}

{#- Section: Features (Markdown) -#}
{#- Renders the features section with repository feature matrix -#}
{#-
    Context required:
        - features (dict): Feature detection data and matrix
        - config (dict): Configuration options

    This section displays:
        - Repository feature matrix showing which features are detected
        - Matches production format: Gerrit Project | Primary Type | Other Types | Dependabot | Pre-commit | ReadTheDocs | .gitreview | G2G | Status
-#}

{% if config.include_sections.features and features.has_features %}
## 🔧 Gerrit Project Feature Matrix

| Gerrit Project | Primary Type | Other Types | Dependabot | Pre-commit | ReadTheDocs | .gitreview | G2G | Status |
|----------------|--------------|-------------|------------|------------|-------------|------------|-----|--------|
{% for repo_data in features.matrix %}
| {{ repo_data.repo_name }} | {{ repo_data.primary_type | default('N/A') }} | {% if repo_data.other_types %}{{ repo_data.other_types | join(', ') }}{% endif %} | {{ '✅' if repo_data.features.dependabot else '❌' }} | {{ '✅' if repo_data.features.pre_commit else '❌' }} | {{ '✅' if repo_data.features.readthedocs else '❌' }} | {{ '✅' if repo_data.features.gitreview else '❌' }} | {{ '✅' if repo_data.features.g2g else '❌' }} | {{ repo_data.status | default('✅') }} |
{% endfor %}

---
{% endif %}
