{# Channels widget — expects: repo_id, buffer, has_email, has_slack, email_schema, slack_schema #}
{% if has_email %}
Email Channel
{% for f in email_schema %} {% if f.type_tag == 'nested' and f.name == 'account' %} {# Account subsection #}
Account
{% include "components/config/nested.html" %}
{% elif f.type_tag == 'nested' and f.name == 'imap' %} {# IMAP subsection #}
IMAP
{% include "components/config/nested.html" %}
{% elif f.type_tag == 'nested' and f.name == 'smtp' %} {# SMTP subsection #}
SMTP
{% include "components/config/nested.html" %}
{% elif f.type_tag == 'nested' and f.name == 'auth' %} {# Sender Authorization subsection #}
Sender Authorization
{% include "components/config/nested.html" %}
{% elif f.type_tag == 'nested' and f.name == 'microsoft_oauth2' %} {# Microsoft 365 OAuth2 subsection #}
Microsoft 365 OAuth2

OAuth2 client credentials for Microsoft 365 mailboxes (Exchange Online). Required when Basic Authentication is disabled. Refer to the Airut documentation for setup details.

{% include "components/config/nested.html" %}
{% endif %} {% endfor %}
{% endif %} {% if has_slack %}
Slack Channel
{% for f in slack_schema %} {% include "components/config/field.html" %} {% endfor %}
{% endif %} {% if not has_email or not has_slack %}
{% if not has_email %} {% endif %} {% if not has_slack %} {% endif %}
{% endif %}