<script type="application/javascript" src="{{ url_for('static', filename='js/plugins/music.mpd/browser.js') }}"></script>

<script type="text/x-template" id="tmpl-music-mpd-browser-item">
    <div class="row item browser-item"
            :class="{selected: selected}"
            @click="$emit('input', {id: (type === 'file' ? '' : (type + ':')) + name, name: name, type: type})">
        <div class="col-1 icon">
            <i class="fa fa-folder" v-if="type === 'directory'"></i>
            <i class="fa fa-list" v-else-if="type === 'playlist'"></i>
            <i class="fa fa-music" v-else-if="type === 'file'"></i>
        </div>

        <div class="col-11 name">{% raw %}{{ type === 'file' ? (artist || '') + (artist ? ' - ' : '') + (title || '[No Title]') : name.split('/').pop() }}{% endraw %}</div>
    </div>
</script>

