{#- Render all AADL packages -#}
{% for pkg in packages -%}
package {{ pkg.name }}
public
{% if pkg.with_packages -%}
  with {{ pkg.with_packages | join(', ') }};
{% endif -%}
{% for comp in pkg.public_types.values() -%}
{{ comp.to_aadl("  ") }}
{% endfor -%}
{% for impl in pkg.public_implementations.values() -%}
{{ impl.to_aadl("  ") }}
{% endfor -%}
end {{ pkg.name }};
{% if not loop.last %}

{% endif -%}
{% endfor %}
