<template>
  <div :class="['th-template-item', 'map', 'inline', {active}]" @click="selectItem">
    <div class="thumb" :style="data.thumbnail?`background-image:url(${data.thumbnail});`:''"></div>
    <div class="name tc" :title="data.name">{{data.name}}</div>
  </div>
</template>

<script>
export default {
  props: ['data', 'active'],
  methods: {
    selectItem() {
      this.$emit('on-click', this.data)
    }
  }
}
</script>
