const template = html`
<div class="search-group-content">
    <h4>{{title}}</h4>
    <small v-if="!data || data.length === 0">No results found</small>
    <div class="search-result" v-for="item in data" :key="item.id" v-if="data && data.length > 0">
        <a :href="'/clients#/'+item.type+'/'+item.id" :class="{'flagged': item.flagged}" @click="$emit('close-search')">
            <i class="fa fa-flag" v-if="item.flagged"></i> {{item.name}}
        </a>
    </div>
</div>
`;

export default {
    props: ['title', 'data'],
    emits: ['close-search'],
    data: function () {
        return {};
    },
    components: {},
    methods: {},
    template
};
