<template>
  <div class="tip-wrapper">
    <div class="icon">
      <img src="./tip-icon.svg" alt="">
    </div>
    <div class="text text-tip-2 text-primary-50-clor">{{ tipText }}</div>
  </div>
</template>

<script setup>
import { computed } from 'vue'

const props = defineProps({
  text: {
    type: String,
    default: ''
  },
  dataSource: {
    type: String,
    default: '美国国会官网'
  },
  dataTime: {
    type: String,
    default: '2023.1至2025.12'
  },

})

const tipText = computed(() => props.text || `数据来源：${props.dataSource},数据时间：${props.dataTime}`)

</script>

<style lang="scss" scoped>
.tip-wrapper {
  width: 100%;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  height: 22px;

  .icon {
    width: 16px;
    height: 16px;

    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>