<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 { useRoute } from "vue-router";
import router from '@/router'

const route = useRoute();

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({
    path: item.path,
    query: {
      billId: route.query.billId
    }
  })
}

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: 20px;
        width: 120px;
        height: 32px;
        display: flex;
        border-radius: 16px;
        cursor: pointer;
        .btn-text {
          width: 68px;
          height: 32px;
          margin-left: 28px;
          line-height: 32px;
          text-align: left;
          box-sizing: border-box;
          font-size: 16px;
          font-weight: 400;
          font-family: Microsoft YaHei;
          color: rgba(95, 101, 108, 1);
        }
        .btn-icon {
          width: 22px;
          padding-top: 9px;
        }
      }
      .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>