{% import "partials/fields.html" as f %} {% import "partials/lanelet_search.html" as ls %} {% import "partials/icons.html" as ic %} {# The inspector renders whatever object the canvas selected. Every section below is built from registry metadata, so a newly registered action, condition, constraint or binding is editable here without touching this template. #}
Inspector
{{ selected }}
{{ ic.icon('target', 15) }}
{% if selected_kind == 'scenario' %} {% include "partials/inspector_scenario.html" %} {% elif selected_kind == 'environment' %} {% include "partials/inspector_environment.html" %} {% elif selected_kind == 'entity' %} {% include "partials/inspector_entity.html" %} {% elif selected_kind == 'action' %} {% set spec = get_action_spec(target.type) %}

{{ spec.category if spec else 'Action' }}

{{ spec.title if spec else target.type }}

{% if spec and spec.description %}

{{ spec.description }}

{% endif %}
{# No actor to choose for an environment action: nothing performs it, and offering the field would let the card be filed under a vehicle that has nothing to do with it. #} {% if spec and spec.scope == 'environment' %}

{{ ic.icon('globe', 13) }} The environment, not a vehicle

{% else %}
{% endif %} {% if spec %}{{ f.fields(spec.fields, target.params, document, '', draft) }}{% endif %} {# Options come from the registry, so a phase cannot exist in the IR and be missing from the only control that sets it. #}

{{ phase_help.get(target.phase, '') }}

{# Every lanelet this action names, each with its map and the choice between a pinned lanelet and a constraint search. Outside the form above: the search is made of forms, and a form cannot nest. #} {% if spec %}{{ ls.modals(spec.fields, target.params, draft, document, target.id, selected) }}{% endif %} {% elif selected_kind == 'condition' %} {% set spec = get_condition_spec(target.type) %}

{{ spec.category if spec else 'Predicate' }}

{{ spec.title if spec else target.type }}

{% if spec and spec.description %}

{{ spec.description }}

{% endif %} {% if spec and spec.fields %} {{ f.fields(spec.fields, target.params, document, '', draft) }} {% elif spec %}

This condition has no parameters.

{% endif %}
{% if spec %}{{ ls.modals(spec.fields, target.params, draft, document, target.id, selected) }}{% endif %} {% if spec and spec.accepts_children %}

{{ spec.min_children }} child condition(s) required, {{ 'unlimited' if spec.max_children is none else spec.max_children }} allowed. Add them on the canvas.

{% endif %} {% elif selected_kind == 'constraint' %} {% set spec = get_constraint_spec(target.type) %}

{{ spec.category if spec else 'Constraint' }}

{{ spec.title if spec else target.type }}

{% if spec and spec.description %}

{{ spec.description }}

{% endif %} {% if spec and spec.fields %} {{ f.fields(spec.fields, target.params, document, '', draft) }} {% else %}

This constraint has no parameters.

{% endif %}
{% endif %}