import { View, Text, Image } from "@tarojs/components";
import { TVisitorAgent } from "@/types/visitor";
import { AvatarMedia } from '@/components/AvatarMedia';
export interface IndexProps {
  data: TVisitorAgent;
}

const VisitorSummary = ({ data }: IndexProps) => {
  return (
    <View className="w-full p-16">
      <View className="flex items-start gap-12">
        <AvatarMedia source={data.avatarUrl ?? ''} roundedFull className='w-50 h-50 shrink-0' mode="aspectFill" />
        <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-20 font-semibold font-pingfangSCSemibold leading-30">{data.name}</View>
              </View>
              <View className="text-12 leading-20">
                <Text className="text-gray-4 leading-20">{data.lastChatTime}</Text>
                和 「<Text className="text-primary">{data.myAgentName}</Text>」
                <Text className="text-[#414A64]">进行</Text><Text className="text-primary">{data.chatRound}</Text> <Text>轮对话</Text>
              </View>
            </View>
          </View>
        </View>
      </View>
    </View>
  );
};

export default VisitorSummary;
