<template>
  <AnalysisBox :title="title" :showAllBtn="false" height="auto">
    <el-empty v-if="!props.listData?.length" description="暂无数据" :image-size="200" />
    <div v-else class="box-main">
      <div class="data-list">
        <div class="data-item" v-for="(item, index) in props.listData" :key="index">
          <div class="item-head">
            <div class="item-name">{{ item.title }}</div>
            <div class="button-box">
              <div class="button-icon">
                <img src="../assets/icons/open.png" alt="" />
              </div>
              <div class="button-text">跳转原文</div>
            </div>
          </div>
          <div class="item-down">
            <div class="item-text" v-for="(text, num) in item.data" :key="num">{{ text }}</div>
          </div>
        </div>
      </div>
      <AiTips :tips="tips"></AiTips>
    </div>
  </AnalysisBox>
</template>

<script setup lang="ts" name="SurveyConclusion">
import AiTips from "@/views/marketAccessRestrictions/com/AiTips.vue";

const props = defineProps({
  listData: {
    type: Array as any,
    default: () => ([])
  },
  title: {
    type: String,
    default: ""
  },
  tips: {
    type: String,
    default: ""
  }
})

</script>

<style scoped lang="scss">
.box-main {
	padding: 0 22px 20px;
  .data-list {
    margin-bottom: 16px;
    border-top: 1px solid rgba(234, 236, 238, 1);
    .data-item {
      .item-head {
        padding: 0 20px;
        height: 48px;
        border-bottom: 1px solid rgba(234, 236, 238, 1);
        background: rgba(247, 248, 249, 1);
        display: flex;
        align-items: center;
        .item-name {
          width: 20px;
          flex: auto;
          font-family: Source Han Sans CN;
          font-size: 18px;
          font-weight: bold;
          line-height: 30px;
          color: var(--text-primary-80-color);
        }
        .button-box {
          display: flex;
          align-items: center;
          margin-left: 50px;
          .button-icon {
            width: 16px;
            height: 16px;
            font-size: 0;
            margin-right: 4px;
            img {
              width: 100%;
              height: 100%;
            }
          }
          .button-text {
            color: var(--color-primary-100);
            font-family: Microsoft YaHei;
            font-size: 12px;
            font-weight: 400;
            line-height: 12px;
          }
        }
      }
      .item-text {
        letter-spacing: 1px;
        padding: 12px 20px 12px 40px;
        color: rgba(59, 65, 75, 1);
        font-family: Source Han Sans CN;
        font-size: 16px;
        font-weight: 400;
        line-height: 30px;
        letter-spacing: 0px;
        text-align: justify;
        border-bottom: 1px solid rgba(234, 236, 238, 1);
      }
    }
  }
}
</style>