defmodule LivebookWeb.SessionLive.SectionComponent do use LivebookWeb, :live_component def render(assigns) do ~H"""

<%= @section_view.name %>

<%= if @section_view.parent do %>

<.remix_icon icon="git-branch-line" class="text-lg font-normal flip-horizontally leading-none" /> from ”<%= @section_view.parent.name %>”

<% end %>
<.live_component module={LivebookWeb.SessionLive.InsertButtonsComponent} id={"insert-buttons-#{@section_view.id}-first"} persistent={@section_view.cell_views == []} smart_cell_definitions={@smart_cell_definitions} section_id={@section_view.id} cell_id={nil} /> <%= for {cell_view, index} <- Enum.with_index(@section_view.cell_views) do %> <.live_component module={LivebookWeb.SessionLive.CellComponent} id={cell_view.id} session_id={@session_id} runtime={@runtime} cell_view={cell_view} /> <.live_component module={LivebookWeb.SessionLive.InsertButtonsComponent} id={"insert-buttons-#{@section_view.id}-#{index}"} persistent={false} smart_cell_definitions={@smart_cell_definitions} section_id={@section_view.id} cell_id={cell_view.id} /> <% end %>
""" end end