<%!-- Break out of the admin layout's p-6 so the canvas fills edge-to-edge. 56px = h-14 topbar height. --%>
<%!-- ===== Toolbar ===== --%>
<%!-- Back to flows list --%> ← Flows <%!-- Editable flow name --%> <%!-- Message type (Phase 11 routing key) --%>
<%= if String.trim(@message_type) != "" do %> <% else %> <% end %>
<%= if @save_status == :saved do %> ✓ Saved <% end %> <%= if @publish_status == :published do %> ✓ Published <% end %> <%= for err <- @validation_errors do %> <%= err %> <% end %> <%!-- Flow ID badge + Audit link (edit mode only) --%> <%= if @flow_id do %> Audit id: <%= @flow_id %> <% end %>
<%!-- ===== Three-column body ===== --%>
<%!-- === Left: Node Palette === --%> <%!-- === Centre: Canvas (phx-update="ignore" protects client DOM) === --%>
<%!-- === Right: Property Panel === --%> <%!-- ========================================================= TEMPLATE PICKER OVERLAY Covers the 3-column area only (below toolbar). ========================================================= --%> <%= if @show_template_picker do %>
<%!-- Header --%>

Choose a Flow Template

Start with a pre-built pattern and customise it, or design from scratch.

<%!-- Split templates into classic vs Phase 9 DAG --%> <% {classic_tpls, dag_tpls} = Enum.split_with(@templates, fn t -> not Map.get(t, :dag, false) end) %> <%!-- Classic template cards grid --%>
<%= for tpl <- classic_tpls do %> <% end %>
<%!-- Phase 9 section divider --%> <%= if dag_tpls != [] do %>
Phase 9 — DAG / Conditional
<%!-- DAG template cards grid --%>
<%= for tpl <- dag_tpls do %> <% end %>
<% end %> <%!-- Start from Scratch card --%>
<% end %>
<%!-- end 3-col body --%>