<template>
  <div class="card-title">
    <img :src="icon === 'circle' ? circle : diamond" alt=""></img>
    <slot></slot>
  </div>
</template>

<script lang="ts" setup>
import { defineProps, withDefaults } from 'vue';
import diamond from '@/assets/images/diamond.png';
import circle from '@/assets/images/circle.png';

withDefaults(defineProps<{ icon?: 'circle' | 'diamond' }>(), { icon: 'diamond' });
</script>

<style lang="less" scoped>
.card-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: Microsoft YaHei;
  font-weight: bold;
  font-size: 20px;
  margin-top: 4px;
  line-height: 42px;
  color: #FFFFFF;
  background: linear-gradient(0deg, #B2FEFF 0%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

img {
  width: 26px;
  height: 26px;
  margin-left: 18px;
}
</style>