{{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">
      <div
        class="pure-g d-flex justify-content-center align-items-stretch mt-2"
      >
        <button
          class="btn pure-u-1-3 text-center rounded-2"
          id="prev-btn-{{unique_id}}"
        >
          Previous Map
        </button>
        <h4 class="pure-u-1-4 py-3 text-center" style="margin: 0px">
          Map <span id="comp-{{unique_id}}"></span>
        </h4>
        <button
          class="btn pure-u-1-3 text-center rounded-2"
          id="next-btn-{{unique_id}}"
        >
          Next Map
        </button>
      </div>

      <img
        id="carousel-obj-{{unique_id}}-0"
        class="pure-img"
        width="100%"
        src="data:image/svg+xml;base64,{{content[0]}}"
        style="display: block"
        alt="No image to display"
      />

      {{for map in range(1, len(displayed_maps))}}
      <img
        id="carousel-obj-{{unique_id}}-{{map}}"
        class="pure-img"
        width="100%"
        src="data:image/svg+xml;base64,{{content[map]}}"
        style="display: none"
        alt="No image to display"
      />
      {{endfor}}
    </div>
  </div>
  <div class="pure-u-1 pure-u-md-1-3">
    {{if description}}
    <p>{{description}}</p>
    {{endif}}
    <!--  -->
    {{if number_of_maps}}
    <p>The masker has <b>{{number_of_maps}}</b> spatial maps in total.</p>
    {{if len(displayed_maps) != number_of_maps}}
    <p>
      Only <b>{{len(displayed_maps)}}</b> spatial maps are shown in this report.
    </p>
    {{endif}}
    <!--  -->
    {{endif}}
  </div>
</div>
<div class="pure-g">
  <div class="pure-u-1 pure-u-md-3-3 table-container">
    {{ parameters|html }}
  </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>

<script>
    {{ js_carousel | html }}
    document.addEventListener("DOMContentLoaded", function () {
      new Carousel("{{unique_id}}", {{ displayed_maps }});
  }
  );
</script>
{{enddef}}
