<%= content_tag :div, class: classes, data: data_attributes do %> <%= render Avo::CoverPhotoComponent.new cover_photo: @cover_photo %> <%= render Avo::PanelHeaderComponent.new( name: @name, description: @description, display_breadcrumbs: @display_breadcrumbs, profile_photo: @profile_photo, external_link: @external_link ) do |header| %> <% if name_slot.present? %> <% header.with_name_slot do %> <%= name_slot %> <% end %> <% end %> <% if tools.present? %> <% header.with_tools do %> <%= tools %> <% end %> <% end %> <% end %> <% if body? %>
<% # The body is wrapped inside another div in order to avoid long & tall panels next to sidebars when the sidebar taller. %>
<%= body %>
<% if sidebar? %>
<%= sidebar %>
<% end %> <% if bare_sidebar? %>
<%= bare_sidebar %>
<% end %>
<% end %> <% if bare_content? %> <%= content_tag :div, class: class_names("relative flex flex-1 flex-col", "has-sidebar": sidebar?), data: { target: :"panel-bare-content" } do %> <%= bare_content %> <% end %> <% end %> <% if footer_tools? %>
<%= footer_tools %>
<% end %> <% if footer? %>
<%= footer %>
<% end %> <% end %>