<template>
  <div
    :class="`w-full ${top ? 'mt-' + top : 'mt-100'} flex items-center justify-center flex-wrap min-h-200`"
  >
    <div v-if="img" class="w-160 h-160 shrink-0 mb-25">
      <img class="w-full h-full object-cover" :src="img" alt="" />
    </div>
    <div class="w-full text-center text-[#BFC8DB]">{{ title }}</div>
  </div>
</template>

<script setup>
import search from '~/assets/img/chat/search.svg'
const imageList = [
  {
    name: 'search',
    img: search
  }
]

const props = defineProps({
  title: {
    type: String,
    default: '暂无数据'
  },
  top: {
    type: String,
    default: ''
  },
  image: {
    type: String,
    default: ''
  }
})

const img = computed(() =>
  props.image ? imageList.find((item) => item.name == props?.image).img : ''
)
</script>

<style lang="scss" scoped></style>
