<div class="toolbar-card {{#if selected}}card-selected{{/if}} {{#eq thumbnail null}}no-thumbnail{{thumbnail}}{{else}}hide-content{{/eq}} {{#if provider}}from-provider{{/if}}" 
    data-type="media" 
    data-media-id="{{id}}"
    data-sub-type="{{type}}"
    data-target="{{#if target}}{{target}}{{else}}layout playlist drawer zone{{/if}}"
    data-data-type="{{dataType}}"
    data-download="{{download}}"
    data-card-title="{{title}}"
    data-original-width="{{width}}"
    data-original-height="{{height}}"
    data-toggle="tooltip" data-title="{{description}}">

    <div class="toolbar-card-preview">
        {{#neq thumbnail null}}
            {{#if videoThumbnail}}
                <video class="thumb" src="{{thumbnail}}" alt="" muted="muted"></video>
            {{else}}
                <img class="thumb" src="{{thumbnail}}" alt="">
            {{/if}}
        {{/neq}}

        {{#neq download null}}
            <div class="preview-button">
                <i class="fa fa-play" data-title="{{trans.preview}}" data-toggle="tooltip" data-placement="top"></i>
            </div>
        {{/neq}}

        <div class="select-button">
            <i class="fa fa-plus selectedHide" data-title="{{trans.select}}" data-toggle="tooltip" data-placement="top"></i>
            <i class="fa fa-check selectedShow" data-title="{{trans.deselect}}" data-toggle="tooltip" data-placement="top"></i>
        </div>

        {{#eq thumbnail null}}
            <i class="{{icon}} card-icon"></i>
        {{/eq}}

        {{#if provider}}
            {{#neq provider.link "#"}}
                <a class="provider" href="{{provider.link}}" target="_blank" rel="noopener noreferrer">
                    <img src="{{provider.logoUrl}}"></img>
                </a>
            {{else}}
                <div class="provider">
                    <img src="{{provider.logoUrl}}"></img>
                </div>
            {{/neq}}
        {{/if}}

        {{#if mediaDuration}}
            <div class="media-duration" data-title="{{trans.duration}}" data-toggle="tooltip" data-placement="top">
                {{mediaDuration}}
            </div>
        {{/if}}
    </div>
    
    <span class="media-title" title="{{title}}" data-placement="right">{{title}}</span>
</div>