<script lang="ts" setup>
import { onMounted } from 'vue'
import { fetchSceneConfig } from '@/api/conversation'


interface Props {
  selectActive: boolean
}

defineProps<Props>()

// 人物场景值设定
const comments = ref('')

async function getSceneList() {
  const res = await fetchSceneConfig()
  comments.value = res.data ? res.data[0].comments : ''
}

onMounted(() => {
  getSceneList()
})

</script>

<template>
  <div class="cps-scene-tips-container">
    <div class="entry" v-if="selectActive">
      <div class="tips">
        <div class="txt-wrap">
          <div class="txt">切换至<span>产品达人</span>角色</div>
        </div>
        <div class="line"></div>
      </div>
      <div class="content">
        <div v-html="comments"></div>
        <!-- <div class="title" style="font-weight: 500;font-size: 15px;color: #222222;line-height: 22px;text-shadow: 0px 4px 8px rgba(246,247,249,0.3);">欢迎使用<span style="color: #29A794;"> 产品达人</span> !</div>
        <div class="txt" style="font-size: 14px;color: #393D46;line-height: 22px;text-shadow: 0px 4px 8px rgba(246,247,249,0.3);margin-top: 8px;">我将专注于产品领域相关知识为您提供服务。</div>      -->
      </div>
    </div>
    <div class="exit" v-else>
      <div class="tips">
        <div class="txt-wrap">
          <div class="txt">退出<span>产品达人</span>角色</div>
        </div>
        <div class="line"></div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.cps-scene-tips-container {
  .entry {
    .content {
      width: 305px;
      background: #fff;
      box-shadow: 0px 4px 8px 0px rgba(246,247,249,0.3);
      border-radius: 12px;
      margin: 20px auto 0;
      padding: 12px;
      .title {
        font-weight: 500;
        font-size: 15px;
        color: #222222;
        line-height: 22px;
        text-shadow: 0px 4px 8px rgba(246,247,249,0.3);
        span {
          color: #29A794;
        }
      }
      .txt {
        font-size: 14px;
        color: #393D46;
        line-height: 22px;
        text-shadow: 0px 4px 8px rgba(246,247,249,0.3);
        margin-top: 8px;
      }
    }
  }

  .tips {
    width: 266px;
    height: 32px;
    margin: 20px auto 0;
    // background: #ddd;
    .txt-wrap {
      position: relative;
      z-index: 2;
      width: 186px;
      margin: 0 auto;
      background: #f6f7f9;
      .txt {
        width: 162px;
        height: 32px;
        background: #ECEEF2;
        border-radius: 16px;
        margin: 0 auto;
        font-size: 13px;
        color: #8D9795;
        line-height: 32px;
        text-align: center;
        span {
          display: inline-block;
          color: #586462;
          margin: 0 5px;
        }
      }
    }
    .line {
      position: relative;
      z-index: 1;
      width: 266px;
      height: 1px;
      background: #E9EBF1;
      margin: -15px auto;
    }
  }

}
</style>
