{% load brickwork_icons i18n %} {% comment %} Empty state (STA-001/002). variant distinguishes "no data yet" (nothing ever created) from "no results" (a filter matched nothing), so the two are never identical: no_results offers a clear-filters action, no_data an onboarding one. The icon is decorative; the heading + body carry the meaning (both required, no package-supplied default copy, STA-003). Required context: heading, body. Optional: variant ("no_data" default or "no_results"), icon (registry name), action_href, action_label. Named blocks (semver-public, BR-BW-TPL-001), all empty by default: icon: wraps the existing icon-resolution branch (CMP-032); an override replaces the whole icon markup. heading: the concise, correct successor to the deprecated title block below (ADR-077 SS4). Wraps the existing {{ heading }} rendering, matching both the context variable it wraps and the bw-empty-state__heading class it sits inside; "title" named neither correctly and is deprecated in the same cycle. body: the concise, correct successor to the deprecated description block below (ADR-077 SS4). Wraps the existing {{ body }} rendering, matching both the context variable it wraps and the bw-empty-state__body class it sits inside; "description" named neither correctly and is deprecated in the same cycle. action: the concise successor to the deprecated empty_state_action block below (CMP-032). Default content is the existing action_href/action_label anchor rendering, so a call site filling only those two context variables renders exactly what it always did. title, description, empty_state_action: DEPRECATED, removed at 4.0 (ADR-077 SS4, BR-BW-TPL-001/BR-BW-VER-001). Kept as additional empty extension points for backwards compatibility: a shipped block name cannot be renamed silently. Each deprecated block renders alongside its concise successor when both are filled; a caller migrating to the concise names fills heading/body/action only. A call site that supplies only heading/body/variant/icon/action_href/ action_label (the pre-existing context-variable path) renders byte-identical output to before these blocks existed. {% endcomment %}
{% block body %}{% block description %}{{ body }}{% endblock %}{% endblock %}
{% block action %} {% if action_href and action_label %} {{ action_label }} {% endif %} {% endblock %} {% block empty_state_action %}{% endblock %}