import { View, Text, Image } from "@tarojs/components";
import "./index.scss";

interface EmptyStateProps {
  text?: string;
  icon?: any; // 图片资源
}

const EmptyState = ({ 
  text = "暂无数据", 
  icon = require("@/static/message/emi.svg") 
}: EmptyStateProps) => {
  return (
    <View className="empty-state">
      <View className="empty-icon">
        <Image className="img" src={icon} />
      </View>
      <Text className="empty-text">{text}</Text>
    </View>
  );
};

export default EmptyState;
