<template name="measurementTableView">
    {{#let config=measurementConfiguration groups=measurementGroups.get}}
        {{#each measurementGroup in groups}}
            {{! #if hasMeasurements measurementGroup.toolGroup.id}}
                {{>measurementTableHeaderRow (clone this
                    toolGroup=measurementGroup.toolGroup
                    measurementRows=measurementGroup.measurementRows)}}
            {{! /if}}
            {{#each rowItem in measurementGroup.measurementRows}}
                {{>measurementTableRow (clone this rowItem=rowItem)}}
            {{/each}}
        {{/each}}

        {{#each newLesionGroup in config.newLesions}}
            {{#let toolGroup=(getNewLesionsToolGroup newLesionGroup)}}
            {{#let newMeasurements=(newLesionsMeasurements toolGroup)}}
                {{#if newMeasurements.length}}
                    {{#let collection=newMeasurements}}
                        {{>measurementTableHeaderRow (clone this
                            toolGroup=toolGroup
                            measurementRows=collection)}}

                        {{#each entry in collection}}
                            {{>measurementTableRow (clone this rowItem=entry)}}
                        {{/each}}
                    {{/let}}
                {{/if}}
            {{/let}}
            {{/let}}
        {{/each}}
    {{/let}}
    {{#unless this.isHud}}
        {{#if or (hasMeasurements 'targets') (hasMeasurements 'nonTargets')}}
            <div class="report-area">
                <div class="btn btn-sm js-pdf">Generate Report</div>
            </div>
        {{/if}}
    {{/unless}}
</template>
