<% title "Pro Analytics" %>

<div class="dashboard-container pro-container" id="user-dashboard">
  <a href="/dashboard" class="rounded-btn rounded-btn--transparent">👈 Back to Main Dashboard</a>

  <a class="rounded-btn <%= "active" unless params[:org_id] %>" href="/dashboard/pro">
    Your Pro Dashboard
  </a>

  <% @organizations.each do |org| %>
    <a
      class="rounded-btn organization <%= "active" if params[:org_id].to_i == org.id %>"
      href="/dashboard/pro/org/<%= org.id %>"
      data-organization-id="<%= org.id %>">
      <%= org.name %> Pro Dashboard
    </a>
  <% end %>

  <section class="header-card card">
    <h1 class="pro-header">Pro Dashboard for <%= @user_or_org.name %></h1>
    <p>Welcome to the Pro Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the developer ecosystem.</p>
    <p>This dashboard highlights deep insights especially relevant to developer relations, authors, and serious bloggers.</p>
  </section>

  <%= render "shared/stats" %>
</div>

<%= javascript_packs_with_chunks_tag "analyticsDashboard", defer: true %>
