<% content_for :navigation do %>
  <h2 class="sub-header-2 color-white m-0">Areas Of Interest</h2>
  <select id="select-academic-year" class="form-select" name="academic-year">
    <%  @academic_years.each do |year| %>
      <option value="<%= district_school_overview_index_path(@district, @school,  {year: year.range}) %>" <%= @academic_year == year ? "selected" : nil %>><%= year.formatted_range %></option>
    <% end %>
  </select>
<% end  %>
<% cache do   %>
  <%= render partial: "svg_defs"  %>
<% end  %>
<% cache [@school, @academic_year, @page.view] do %>
  <div class="card">
    <div class="d-flex justify-content-between align-items-center">
      <h2 class="sub-header-2">School Quality Framework Indicators</h2>
      <%= render partial: "harvey_ball_legend"  %>

      <% if @category_presenters.any? {|category_presenter| category_presenter.show_parent_view?(school: @school, academic_year: @academic_year) }   %>
        <%= render partial: "student_parent_toggle"  %>
      <% end %>
    </div>
    <%= render partial: "quality_framework_indicators", locals: { category_presenters: @category_presenters } %>

<% if @page.show_student_response_rates  %>
    <div class="overall-response-rate-row">
      <%= render partial: "response_rate", locals: {response_rate_presenter: @student_response_rate_presenter} %>
      <%= render partial: "response_rate", locals: {response_rate_presenter: @teacher_response_rate_presenter} %>
    </div>
  <% else  %>
    <div class="overall-response-rate-row">
      <%= render partial: "response_rate", locals: {response_rate_presenter: @parent_response_rate_presenter} %>
    </div>
  <% end %>

  </div>
  <div class="card">
    <h2 class="sub-header-2 mb-4">Distance From Benchmark</h2>
    <%= render partial: "variance_chart", locals: { presenters: @variance_chart_row_presenters } %>
  </div>
  <% if @district == District.find_by_name("Boston")  %>
    <%= render partial: 'layouts/boston_modal' %>
  <% elsif @has_empty_dataset %>
    <%= render partial: 'layouts/empty_dataset_modal' %>
  <% end %>
<% end  %>
