{{inherit "base.html"}}
<!--  -->
{{def navbar}} {{enddef}}
<!--  -->
{{def report}}
<div class="pure-g">
  <div class="pure-u-1 pure-u-md-2-3">
    <div class="image">
      <img
        class="pure-img"
        width="100%"
        src="data:image/png;base64,{{content}}"
        alt="image"
      />
      {{if overlay}}
      <div class="overlay">
        <img
          class="pure-img"
          width="100%"
          src="data:image/png;base64,{{overlay}}"
          alt="overlay"
        />
      </div>
      {{endif}}
    </div>
  </div>
  <div class="pure-u-1 pure-u-md-1-3">
    {{if description}}
    <p>{{description}}</p>
    {{endif}}
    <!--  -->
    {{if n_elements }}
    <div class="pure-u-1 pure-u-md-3-3">
      <p>
        The mask includes {{ n_elements }} vertices ({{ coverage }} %) of the
        image.
      </p>
    </div>
    {{endif}}
    <!--  -->
    {{if n_vertices}}
    <div>
      <table class="pure-table">
        <thead>
          <tr>
            <th>Hemisphere</th>
            <th>Number of vertices</th>
          </tr>
        </thead>

        <tbody>
          {{py: vertices = n_vertices.items()}} {{for hemi, nb in vertices}}
          <tr>
            <td data-column="Hemisphere">{{hemi}}</td>
            <td data-column="Number of vertices">{{nb}}</td>
          </tr>
          {{endfor}}
        </tbody>
      </table>
    </div>
    {{endif}}
    <!--  -->
    {{if number_of_regions}}
    <p>
      The masker has <b>{{number_of_regions}}</b> different non-overlapping
      regions.
    </p>
    {{endif}}
  </div>
</div>
<div class="pure-g">
  <div class="pure-u-1 pure-u-md-3-3">
    <div class="d-flex flex-column">
      <div class="table-container">{{ parameters|html}}</div>
      <!--  -->
      {{if summary }}
      <!--  tables listing each region for each part  -->
      <div
        style="display: flex; justify-content: space-around; flex-wrap: wrap"
      >
        {{py: parts = summary_html.items()}}
        <!--  -->
        {{for region, region_table in parts}}
        <!--  -->
        <details>
          <summary class="pure-button">Regions summary - {{ region }}</summary>
          <div class="table-container">{{region_table|html}}</div>
        </details>
        {{endfor}}
      </div>
      {{endif}}
    </div>
  </div>
</div>
<div class="pure-u-1 pure-u-md-3-3 d-flex justify-content-center">
  <p>
    This report was generated based on information provided at instantiation and
    fit time. Note that the masker can potentially perform resampling at
    transform time.
  </p>
</div>
{{enddef}}
