<template>
  <div class="home-container">
    <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;
    position: relative;
    .home-sider {
      width: 160px;
      position: absolute;
      top: 0;
      left: -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>