<%= if assigns[:flash] do %>
  <%= render("_flash.html", assigns) %>
<% end %>

<%= if @conn.assigns[:current_user] do %>
  <div class="flex flex-col gap-y-2">
    <Notice.active_grace_period
      :if={Plausible.Auth.GracePeriod.active?(@conn.assigns.current_user)}
      enterprise?={Plausible.Auth.enterprise_configured?(@conn.assigns.current_user)}
      grace_period_end={grace_period_end(@conn.assigns.current_user)}
    />

    <Notice.dashboard_locked :if={Plausible.Auth.GracePeriod.expired?(@conn.assigns.current_user)} />

    <Notice.subscription_cancelled user={@conn.assigns.current_user} />

    <Notice.subscription_past_due
      subscription={@conn.assigns.current_user.subscription}
      class="container"
    />

    <Notice.subscription_paused
      subscription={@conn.assigns.current_user.subscription}
      class="container"
    />
  </div>
<% end %>
