<template name="studyTimepointStudy">
    {{#let isSidebar=(isUndefined viewportIndex)}}
        <div class="study-browser-item {{#if isSidebar}}studySidebarTimepoint{{else}}studyQuickSwitchTimepoint{{/if}} {{#if this.active}}active{{/if}} {{#if isLoading}}loading{{/if}}" data-uid="{{this.study.studyInstanceUid}}">
            <div class="study-item">
                {{#if isLoading}}
                    {{>loadingText}}
                {{/if}}
                <div class="study-item-box">
                    <div class="study-modality">
                        <div class="study-modality-text" style="{{modalityStyle}}">
                            {{choose instance.modalities 'UN'}}
                        </div>
                    </div>
                    <div class="study-text">
                        <div class="study-date">{{formatDA instance.studyDate 'D-MMM-YYYY'}}</div>
                        <div class="study-description">{{instance.studyDescription}}</div>
                    </div>
                </div>
            </div>
            {{#if isSidebar}}
                <div class="study-browser-series">
                    <div class="study-series-container">
                        {{#each thumbnail in (studyThumbnails this.study)}}
                            {{>thumbnailEntry (clone this thumbnail=thumbnail)}}
                        {{/each}}
                    </div>
                </div>
            {{/if}}
        </div>
    {{/let}}
</template>
