{# The tenant switcher with the current tenant's settings and billing links. on_light: on the white top bar. #} {% import "tungsten/components/ui.html" as ui %}
{% call(part) ui.dropdown(align='start', width='w-full', classes='w-full') %} {% if part == 'trigger' %} {% else %} {% for item in tenant_menu %} {{ icon(item.icon, 'h-4 w-4') }}{{ item.label }} {% endfor %} {% if tenant_menu and tenants %}
{% endif %} {% for t in tenants %} {% if panel.tenancy.in_url %} {{ panel.tenancy.label(t) }}{% if t == tenant %}{{ icon('check', 'h-4 w-4') }}{% endif %} {% else %}
{% endif %} {% endfor %} {% if tenant_register_url %}
{{ icon('plus', 'h-4 w-4') }}{{ __('Register :label', label=panel.tenancy.get_label().lower()) }} {% endif %} {% endif %} {% endcall %}