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

<script type="text/x-template" id="tmpl-media-results">
    <div class="results" :class="{resize: resize}">
        <div class="empty" v-if="searching || loading || !results.length">
            <div class="searching" v-if="searching">Searching</div>
            <div class="loading" v-else-if="loading">Loading</div>
            <div class="no-results" v-else-if="!results.length">No results</div>
        </div>

        <media-item v-for="item in results"
                    :key="item.url"
                    :bus="bus"
                    :selected="item.url && item.url === selectedItem.url"
                    :active="(status.state === 'play' || status.state === 'pause') && item.url && item.url === status.url"
                    :item="item"
                    v-else>
        </media-item>

        <dropdown id="media-item-dropdown"
                  ref="mediaItemDropdown"
                  :items="mediaItemDropdownItems">
        </dropdown>
    </div>
</script>

