import { View, Text, Image } from "@tarojs/components";
import DigitalCardBasic from "@/components/DigitalCard/DigitalCardBasic";
import { TVisitorAgent } from "@/types/visitor";
import TagCertificated from "@/components/tag-certificated";
export interface IndexProps {
  data: TVisitorAgent;
}

const VisitorSummary = ({ data }: IndexProps) => {
  return (
    <View className="w-full p-12">
      <View className="flex items-center gap-12">
        <View className="flex items-center rounded-full overflow-hidden">
          <View className="w-60 h-60 bg-gray-3 rounded-full">
            {!!data.avatarUrl && (
              <Image
                src={data.avatarUrl}
                mode="aspectFill"
                className="w-60 h-60 bg-gray-3 rounded-full"
              ></Image>
            )}
          </View>
        </View>
        <View className="flex flex-col gap-8">
          <View className="flex items-start">
            <View className="flex flex-col flex-1">
              <View className="flex items-end gap-8">
                <View className="text-24 font-medium leading-32">{data.name}</View>
                <View className="text-12 leading-20">{data.position ?? ""}</View>
              </View>
              <View className="flex items-center gap-2">
                <View className="text-12 leading-20 truncate max-w-[188px]">{}</View>
                {data.isEnt && <TagCertificated />}
              </View>
            </View>
          </View>
          <View className="flex-center text-12 leading-20">
            <View className="flex-1">
              <Text className="text-primary">{data.chatRound}</Text> 轮对话
            </View>
            <View className="text-gray-4 leading-20">{data.lastChatTime}</View>
          </View>
        </View>
      </View>
    </View>
  );
};

export default VisitorSummary;
