{{ ui.icon(role, symbols.get(role, "")) }}
{{ entity.name }}{{ role }}
{% set dead = dead_code_of(state, entity.path) %}
{% if dead %}{{ dead.verdict }}{% endif %}
{# Open the graph views focused on this entity, with its direct neighbours. #}
{% set views = [] %}
{% if entity.kind == "module" %}
{% set views = [("architecture", "Architecture", "/code/diagrams/architecture?depth=1&focus=" ~ entity.path), ("git", "Git", "/git?file=" ~ entity.filepath)] %}
{% elif entity.kind == "class" %}
{% set views = [("classes", "Classes", "/code/diagrams/classes?depth=1&focus=" ~ entity.path), ("calls", "Functions and Calls", "/code/diagrams/calls?focus=" ~ entity.path)] %}
{% elif entity.kind == "function" or entity.language != "python" %}
{% set views = [("calls", "Functions and Calls", "/code/diagrams/calls?focus=" ~ entity.path)] %}
{% endif %}
{% if modal %}
{# In the consultation modal, the actions go to its footer (swapped out of band): the page, the views. #}
{% elif views %}