<template>
  <view class="px-15">
    <view v-if="qrcode && qrcode.guide" class="team-introduce-wrapper rounded shadow-lg">
      <view class="team-introduce flex items-center">
        <view class="team-introduce-border"></view>
        <!-- <view class="triangle-wrapper">
          <view class="team-triangle"></view>
        </view> -->
        <image class="laba-icon flex-shrink-0" src="/static/home/speaker-intro.png" mode="aspectFit"></image>
        <view class="introduce-text flex-grow line-clamp-2">
          {{ qrcode.guide }}
        </view>
      </view>
    </view>
  </view>
</template>
<script setup>
import { computed } from "vue";

const props = defineProps({
  team: {
    type: Object,
    default: () => ({}),
  }
});

const qrcode = computed(() => {
  const qrcodes = props.team && Array.isArray(props.team.qrcodes) ? props.team.qrcodes : [];
  return qrcodes[0] || ''
})


</script>
<style scoped>
.laba-icon {
  width: 48rpx;
  height: 48rpx;
  margin-left: 12rpx;
  margin-right: 12rpx;
}

.team-introduce-wrapper {
  background: #fff;
  z-index: 2;
}

.team-introduce {
  width: 690rpx;
  box-sizing: border-box;
  background: linear-gradient(186deg,
      rgba(255, 255, 255, 0.4) 13.34%,
      rgba(255, 255, 255, 0.6) 99.17%);
  border-radius: 16rpx;
  padding: 20rpx;
  position: relative;
  overflow: visible;
}

.team-introduce-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid #fff;
  border-radius: 16rpx;
  pointer-events: none;
  /* -webkit-mask-image: linear-gradient(to right, #000 0, #000 50rpx, transparent 50rpx, transparent 70rpx, #000 70rpx),
    linear-gradient(#000, #000);
  mask-image: linear-gradient(to right, #000 0, #000 50rpx, transparent 50rpx, transparent 70rpx, #000 70rpx),
    linear-gradient(#000, #000);
  -webkit-mask-size: 100% 1px, 100% 100%;
  mask-size: 100% 1px, 100% 100%;
  -webkit-mask-position: 0 0, 0 1px;
  mask-position: 0 0, 0 1px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat; */
}

.triangle-wrapper {
  position: absolute;
  top: -12rpx;
  left: 60rpx;
  width: 32rpx;
  height: 12rpx;
  overflow: hidden;
  z-index: 10;
  transform: translateX(-50%);
}

.team-triangle {
  position: absolute;
  left: 50%;
  bottom: -9rpx;
  width: 16rpx;
  height: 16rpx;
  background: linear-gradient(186deg,
      rgba(255, 255, 255, 0.4) 13.34%,
      rgba(255, 255, 255, 0.6) 99.17%);
  transform: translateX(-50%) rotate(45deg);
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  box-sizing: border-box;
}

.introduce-text {
  color: #333;
  font-size: 26rpx;
  font-style: normal;
  font-weight: 400;
  line-height: 36rpx;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
</style>