<template>
  <div class="home-container">
    <!-- <div class="home-top">
      <div class="home-top-left-box">
        <div class="left-box-top">
          <div class="icon">
            <img src="./assets/images/USA-logo.png" alt="" />
          </div>
          <div class="info">
            <div class="info-box1">{{ "H.R.1(119th)-大而美法案" }}</div>
            <div class="info-box2">
              {{ "第119届美国国会众议院第1号法案 One Big Beautiful Bill Act" }}
            </div>
          </div>
        </div>
        <div class="left-box-bottom">
          <div
            class="left-box-bottom-item"
            style="border-bottom: 2px solid rgba(22, 119, 255, 1)"
          >
            <div class="icon">
              <img src="./assets/icons/icon1.png" alt="" />
            </div>
            <div class="name" style="color: rgba(22, 119, 255, 1)">
              法案概况
            </div>
          </div>
          <div class="left-box-bottom-item">
            <div class="icon">
              <img src="./assets/icons/icon2.png" alt="" />
            </div>
            <div class="name">深度挖掘</div>
          </div>
          <div class="left-box-bottom-item">
            <div class="icon">
              <img src="./assets/icons/icon3.png" alt="" />
            </div>
            <div class="name">影响分析</div>
          </div>
          <div class="left-box-bottom-item">
            <div class="icon">
              <img src="./assets/icons/icon4.png" alt="" />
            </div>
            <div class="name">相关情况</div>
          </div>
        </div>
      </div>
      <div class="home-top-right-box">
        <div class="right-box-top">
          <div class="time">{{ "2025年7月" }}</div>
          <div class="name">{{ "乔迪·阿灵顿（Jodey Arrington）​​ " }}</div>
        </div>
        <div class="right-box-bottom">
          <el-button type="plain" size="large" icon="Search"
            >法案原文</el-button
          >
          <el-button type="primary" size="large" icon="EditPen"
            >分析报告</el-button
          >
        </div>
      </div>
    </div> -->
    <div class="home-center">
      <div class="home-sider">
        <div
          class="sider-btn"
          :class="{ siderBtnActive: siderBtnActive === item.name }"
          @click="handleClickLeftSiderBtn(item)"
          v-for="item,index in siderBtnList"
          :key="index"
        >
          <div class="btn-text">{{item.name}}</div>
          <div class="btn-icon">
            <el-icon v-if="siderBtnActive === item.name" color="#fff"
              ><CaretRight
            /></el-icon>
          </div>
        </div>
      </div>
      <div class="home-main">
        <router-view />
      </div>
    </div>
  </div>
</template>

<script setup>
import { onMounted, ref } from "vue";
import router from '@/router'

const siderBtnList = ref([
  {
    name: '法案简介',
    path: '/billLayout/bill/introduction'
  },
   {
    name: '法案背景',
    path: '/billLayout/bill/background'
  },
   {
    name: '内容概要',
    path: '/billLayout/bill/template'
  },
])

const siderBtnActive = ref("法案简介");
const handleClickLeftSiderBtn = (item) => {
  siderBtnActive.value = item.name
  router.push(item.path)
}
const progressList = ref([
  {
    tip: true,
    date: "7月5日",
    title:
      "特朗普于美国独立日签署法案，​公法编号Pub. L. No. 119-21。白宫举行庆典，B-2轰炸机飞越上空，象征“美国新时代”开启。",
    degree: "特别重大风险",
    rank: 4,
  },
  {
    tip: true,
    date: "7月4日",
    title:
      "众议院最终表决218票赞成 vs 214票反对，修订版法案以4票优势通过，2名共和党议员倒戈，民主党全员反对。",
    degree: "重大风险",
    rank: 3,
  },
  {
    tip: true,
    date: "7月3日",
    title:
      "民主党领袖杰弗里斯发表 ​8小时45分钟​ 演讲（众议院现代史最长），抗议法案“劫贫济富”，但仍未阻止表决。",
    degree: "较大风险",
    rank: 2,
  },
  {
    tip: true,
    date: "7月2日",
    title:
      "众议院以 ​219:213​ 通过程序规则，为最终表决铺路。此前4名共和党议员反对程序规则，议长约翰逊紧急游说挽回1票。",
    degree: "低风险",
    rank: 1,
  },
  {
    tip: false,
    date: "7月1日",
    title:
      "参议院最终表决投票51:50​，副总统万斯（JD Vance）投出关键票打破平局。3名共和党参议员倒戈（蒂利斯、保罗、柯林斯）。",
    degree: "",
  },
]);

const wordCloudData = [
  { name: "财政保守主义", value: 100 },
  { name: "移民与边境安全", value: 5 },
  { name: "削减市民福利", value: 77 },
  { name: "债务驱动型经济", value: 35 },
  { name: "传统能源", value: 96 },
  { name: "与马斯克公开冲突", value: 57 },
  { name: "共和党财政鹰派", value: 72 },
  { name: "财政问责法案", value: 18 },
  { name: "强硬边境政策", value: 34 },
  { name: "扩大军费", value: 16 },
  { name: "债务与赤字警告", value: 72 },
  { name: "批评美国债务膨胀", value: 58 },
];

onMounted(() => {});
</script>

<style lang="scss" scoped>
.home-container {
  width: 100%;
  height: 100%;
  // background: rgba(243, 243, 244, 1);
  .home-top {
    height: 137px;
    background: rgba(255, 255, 255, 1);
    display: flex;
    justify-content: space-between;
    .home-top-left-box {
      width: 500px;
      margin-left: 160px;
      margin-top: 13px;
      .left-box-top {
        height: 64px;
        display: flex;
        .icon {
          width: 64px;
          height: 64px;
        }
        .info {
          margin-left: 9px;
          .info-box1 {
            color: rgba(59, 65, 75, 1);
            font-family: Microsoft YaHei;
            font-size: 20px;
            font-weight: 600;
            line-height: 22px;
            letter-spacing: 0px;
            text-align: left;
            margin-top: 5px;
          }
          .info-box2 {
            margin-top: 5px;
            height: 22px;
            line-height: 22px;
            color: rgba(132, 136, 142, 1);

            font-family: Microsoft YaHei;
            font-size: 14px;
            font-weight: 400;
            line-height: 22px;
            letter-spacing: 0px;
            text-align: left;
          }
        }
      }
      .left-box-bottom {
        display: flex;
        height: 40px;
        margin-top: 21px;
        .left-box-bottom-item {
          display: flex;
          margin-right: 32px;
          height: 38px;
          .name {
            color: rgba(95, 101, 108, 1);
            font-family: Microsoft YaHei;
            font-size: 14px;
            font-weight: 400;
            line-height: 22px;
            letter-spacing: 0px;
            text-align: left;
            margin-left: 3px;
          }
        }
      }
    }
    .home-top-right-box {
      width: 300px;
      margin-right: 150px;
      margin-top: 13px;
      .right-box-top {
        .time {
          height: 24px;
          line-height: 24px;
          color: rgba(95, 101, 108, 1);
          font-family: Microsoft YaHei;
          font-size: 16px;
          font-weight: 400;
          line-height: 22px;
          letter-spacing: 0px;
          text-align: right;
        }
        .name {
          height: 24px;
          line-height: 24px;
          color: rgba(95, 101, 108, 1);
          font-family: Microsoft YaHei;
          font-size: 16px;
          font-weight: 400;
          line-height: 22px;
          letter-spacing: 0px;
          text-align: right;
        }
      }
      .right-box-bottom {
        margin-top: 24px;
        text-align: right;
      }
    }
  }
  .home-center {
    display: flex;
    height: 879px;
    .home-sider {
      width: 160px;
      .sider-btn {
        margin-top: 20px;
        margin-left: 23px;
        width: 112px;
        height: 32px;
        display: flex;
        line-height: 32px;
        border-radius: 16px;
        cursor: pointer;
        .btn-text {
          width: 82px;
          height: 32px;
          line-height: 32px;
          text-align: left;
          box-sizing: border-box;
          padding-left: 24px;
          font-size: 14px;
          font-family: Microsoft YaHei;
          color: rgba(95, 101, 108, 1);
        }
        .btn-icon {
          width: 22px;
          padding-top: 2px;
        }
      }
      .siderBtnActive {
        background: var(--color-main-active);
        .btn-text {
          color: #fff !important;
        }
      }
    }
    .home-main {
      flex: 1;
      display: flex;
    }
  }
}

:deep(.el-steps--simple) {
  padding: 6px 10px;
}
:deep(.el-timeline-item) {
  padding-bottom: 5px !important;
}
:deep(.el-timeline-item__timestamp) {
  color: rgba(95, 101, 108, 1) !important;
  font-family: Microsoft YaHei !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
.timeline-content {
  color: rgba(132, 136, 142, 1);
  font-family: Microsoft YaHei;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}
</style>