{% set p = component.props %} {% set element_id = 'forge-element-' ~ component.element_id %} {% macro drilldown(aria_label='View related details') -%} {% if component.action %}{% endif %} {%- endmacro %} {% if component.type == 'page' %}
{{ children }}
{% elif component.type == 'container' %}
{{ children }}
{% elif component.type in ['stack', 'inline'] %}
{{ children }}
{% elif component.type == 'grid' %}
{{ children }}
{% elif component.type == 'card' %}
{% if p.title %}

{{ p.title }}

{% endif %}{{ children }}{{ drilldown('View details for ' ~ p.title if p.title else 'View card details') }}
{% elif component.type == 'section' %}
{% if p.title %}

{{ p.title }}

{% if p.description %}

{{ p.description }}

{% endif %}
{% endif %}{{ children }}
{% elif component.type == 'page-header' %}

{{ p.title }}

{% if p.subtitle %}

{{ p.subtitle }}

{% endif %}
{% elif component.type == 'divider' %}
{% elif component.type == 'repeat' %}
{{ children }}
{% elif component.type == 'heading' %} {{ p.text }} {% elif component.type == 'text' %}

{{ p.text }}

{% elif component.type == 'badge' %} {{ p.label }} {% elif component.type == 'icon' %} {% elif component.type == 'key-value' %}
{% for row in extra.rows %}
{{ row.label }}
{{ row.value }}
{% endfor %}
{% elif component.type == 'aggregate-metric' %}

{{ p.label }}

{{ extra.value }}Filtered sample · up to 100 rows{{ drilldown('View details for ' ~ p.label) }}
{% elif component.type == 'mermaid' %}
{{ p.title }}
{% if extra.nodes %}
{{ extra.svg }}
    {% for node in extra.nodes %}
  1. {{ node.label }}
  2. {% endfor %}
{% if p.state_path %}{% endif %}
{% for edge in extra.edges %}{% else %}{% endfor %}
Connections
FromToRelationship
{% for node in extra.nodes if node.id == edge.source %}{{ node.label }}{% endfor %}{% for node in extra.nodes if node.id == edge.target %}{{ node.label }}{% endfor %}{{ edge.label or '→' }}
No connections
{% else %}

No nodes match the current filter.

{% endif %}
{% elif component.type == 'metric' %}

{{ p.label }}

{{ extra.value }}{% if extra.delta is not none %}{{ extra.delta }} vs comparison{% endif %}{% if p.detail %}{{ p.detail }}{% endif %}{{ drilldown('View details for ' ~ p.label) }}
{% elif component.type == 'alert' %}
{{ p.title }}

{{ p.message }}

{{ drilldown('View details for ' ~ p.title) }}
{% elif component.type == 'progress' %}
{{ p.label }}{{ extra.display_value }}
{{ p.value }} / {{ p.maximum }}{{ drilldown('View details for ' ~ p.label) }}
{% elif component.type == 'empty-state' %}

{{ p.title }}

{{ p.message }}

{{ drilldown('View details for ' ~ p.title) }}
{% elif component.type == 'table' %}
{% for column in p.columns %}{% endfor %}{% for row in extra.rows %}{% for column in p.columns %}{{ row.get(column.key, '—') }}{% endfor %}{% else %}{% endfor %}
{{ column.label }}
{{ p.empty_message }}
{{ drilldown('View table details') }}
{% elif component.type == 'status-list' %}
    {% for row in extra.rows %}
  1. {{ row.get('name', row.get('device_id', 'Item')) }}{{ row.get('message', row.get('status', '')) }}
  2. {% else %}
  3. {{ p.empty_message }}
  4. {% endfor %}
{{ drilldown('View status details') }}
{% elif component.type == 'timeline' %}
    {% for row in extra.rows %}
  1. {{ row.get('message', row.get('name', 'Activity')) }}

  2. {% else %}
  3. {{ p.empty_message }}
  4. {% endfor %}
{{ drilldown('View timeline details') }}
{% elif component.type in ['line-chart', 'bar-chart', 'donut-chart', 'sparkline'] %}
{% if p.get('title') %}
{{ p.get('title') }}
{% elif p.get('label') %}
{{ p.get('label') }}
{% endif %}{{ extra.chart_svg }}
Data summary{% for row in extra.chart_rows %}{% endfor %}
SeriesLatestRange
{{ row.label }}{{ row.latest }}{{ row.minimum }}–{{ row.maximum }}
{{ drilldown('View details for ' ~ (p.get('title') or p.get('label') or 'chart')) }}
{% elif component.type == 'button' %} {% elif component.type == 'modal' %}

{{ p.title }}

{% if p.description %}

{{ p.description }}

{% endif %}
{{ children }}
{% elif component.type == 'form' %}
{% if p.title %}

{{ p.title }}

{% endif %}{{ children }}
{% elif component.type == 'field-group' %}
{{ p.legend }}{% if p.description %}

{{ p.description }}

{% endif %}{{ children }}
{% elif component.type == 'field' %}
{{ p.label }}{% if p.hint %}

{{ p.hint }}

{% endif %}{{ children }}
{% elif component.type in ['text-input', 'search'] %} {% elif component.type == 'textarea' %} {% elif component.type == 'number-input' %} {% elif component.type == 'select' %} {% elif component.type == 'radio-group' %}
{{ p.label }}{% for option in p.options %}{% endfor %}
{% elif component.type in ['checkbox', 'toggle'] %} {% elif component.type == 'tabs' %}
{{ children }}
{% elif component.type == 'date-range' %} {% elif component.type == 'breadcrumbs' %} {% elif component.type == 'pagination' %} {% elif component.type == 'toast' %}
{{ p.message }}
{% elif component.type == 'image' %} {% elif component.type == 'file-upload' %} {% else %} {% endif %}