<template>
  <!-- 通用页脚 -->
  <div class="custom-footer">
    <span>&copy; 2025 FiEE, Inc. All Rights Reserved.</span>
    <div class="footer-links-box">
      <div class="footer-links">
        <span @click="handleLink('privacyPolicy')">Privacy Policy</span>
        <span @click="handleLink('termsOfUse')">Terms of use</span>
        <span @click="handleLink('siteMap')">Site Map</span>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

import privacyPolicy from "@/assets/file/footer/FiEE, Inc. _ Privacy policy.pdf";
import termsOfUse from "@/assets/file/footer/FiEE, Inc. _ Terms of Use.pdf";
import siteMap from "@/assets/file/footer/FiEE, Inc. _ Site Map.pdf";

//点击跳转到对应的链接页面
const handleLink = (link) => {
  // if (link === "privacyPolicy") {
  //   window.open(privacyPolicy, "_blank");
  // } else if (link === "termsOfUse") {
  //   window.open(termsOfUse, "_blank");
  // } else if (link === "siteMap") {
  //   window.open(siteMap, "_blank");
  // }
  router.push(link)
};
</script>

<style scoped lang="scss">
.custom-footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  color: #888;
  font-size: 0.9rem;
  background: #f7f8fa;
  letter-spacing: 5px;
  border-top: 5px solid #ececec;
  z-index: 100;

  .footer-links-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0.6rem 0 0;

    .footer-links {
      span {
        border-right: 1px solid #d2d2d7;
        padding: 0 0.8rem;
        cursor: pointer;
        font-size: 0.75rem;
        display: inline-block;
        text-align: left;
      }
      span:nth-last-child(1) {
        border: 0;
      }
    }
  }
}
</style>
