<div class="history-detail-modal">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>

        <h3>
            {{#if_eq eventType compare="grabbed"}}Grabbed{{/if_eq}}
            {{#if_eq eventType compare="downloadFailed"}}Download Failed{{/if_eq}}
            {{#if_eq eventType compare="downloadFolderImported"}}Episode Imported{{/if_eq}}
        </h3>

    </div>
    <div class="modal-body">
        {{#if_eq eventType compare="grabbed"}}
            <dl class="dl-horizontal">

                <dt>Name</dt>
                <dd>{{sourceTitle}}</dd>

                {{#with data}}
                    {{#if indexer}}
                        <dt>Indexer</dt>
                        <dd>{{indexer}}</dd>
                    {{/if}}

                    {{#if releaseGroup}}
                        <dt>Release Group</dt>
                        <dd>{{releaseGroup}}</dd>
                    {{/if}}

                    {{#if nzbInfoUrl}}
                        <dt>Info</dt>
                        <dd><a href="{{nzbInfoUrl}}">{{nzbInfoUrl}}</a></dd>
                    {{/if}}
                {{/with}}
            </dl>
        {{/if_eq}}
        {{#if_eq eventType compare="downloadFailed"}}
            <dl class="dl-horizontal">
                {{#with data}}
                    <dt>Message</dt>
                    <dd>{{message}}</dd>
                {{/with}}
            </dl>
        {{/if_eq}}
        {{#if_eq eventType compare="downloadFolderImported"}}
            {{#if data}}
                {{#with data}}
                <dl class="dl-horizontal">
                    {{#if droppedPath}}
                        <dt>Source:</dt>
                        <dd>{{droppedPath}}</dd>
                    {{/if}}

                    {{#if importedPath}}
                        <dt>Imported To:</dt>
                        <dd>{{importedPath}}</dd>
                    {{/if}}
                </dl>
                {{/with}}
            {{else}}
                No details available
            {{/if}}
        {{/if_eq}}
    </div>
    <div class="modal-footer">
        {{#if_eq eventType compare="grabbed"}}<button class="btn btn-danger x-mark-as-failed">mark as failed</button>{{/if_eq}}
        <button class="btn" data-dismiss="modal">close</button>
    </div>
</div>

