<%= content_for :content do %>
  <div class="flex h-full bg-gray-25">
    <div class="p-6 pb-20 w-[368px] shrink-0 h-full overflow-y-auto">
      <% if content_for?(:sidebar) %>
        <%= yield :sidebar %>
      <% else %>
        <%= render "layouts/sidebar" %>
      <% end %>
    </div>

    <main class="grow px-20 py-6 h-full <%= require_upgrade? ? "relative overflow-hidden" : "overflow-y-auto" %>">
      <% if require_upgrade? %>
        <%= render "shared/subscribe_modal" %>
      <% end %>

      <%= yield %>
    </main>
  </div>

  <% if (upgrade = get_upgrade_for_notification(Current.user, Setting.upgrades_mode)) %>
    <%= render partial: "shared/upgrade_notification", locals: { upgrade: upgrade } %>
  <% end %>
<% end %>

<%= render template: "layouts/application" %>
