<template>
  <view class="empty-state flex flex-col items-center justify-center py-16 px-6">
    <view class="w-16 h-16 rounded-full flex items-center justify-center mb-4" style="background-color: #f3f4f6;">
      <text class="uni-icons text-3xl text-gray-300" :class="icon || 'uniui-info-filled'"></text>
    </view>
    <text class="text-sm text-gray-400 font-medium">{{ text || '暂无数据' }}</text>
    <slot />
  </view>
</template>

<script setup lang="ts">
interface Props {
  icon?: string
  text?: string
}

withDefaults(defineProps<Props>(), {
  icon: 'uniui-info-filled',
  text: '暂无数据'
})
</script>

<style scoped>
.empty-state {
  min-height: 200px;
}
</style>
