<template>
  <!-- 通用页脚 -->
  <div class="custom-footer">
    <div class="footer-links-box">
      <div class="footer-links">
        <span @click="handleLink('privacyPolicy')">{{ $t("footer.privacy_policy") }}</span>
        <span @click="handleLink('termsOfUse')">{{ $t("footer.terms_of_use") }}</span>
        <span @click="handleLink('siteMap')">{{ $t("footer.site_map") }}</span>
      </div>
    </div>
    <div class="footer-copyright">
      2025 FiEE（HK）Limited. All Rights Reserved.
    </div>
  </div>
</template>

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

//点击跳转到对应的链接页面
const handleLink = (link) => {
  router.push(localePath(link));
};
</script>

<style scoped lang="scss">
.custom-footer {
  width: 100%;
  text-align: center;
  padding: 1rem 0;
  color: #888;
  font-size: 0.9rem;
  font-family: "PingFang SC", sans-serif;
  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;

    .footer-links {
      span {
        border-right: 1px solid #d2d2d7;
        padding: 0 16 * 5.12px;
        cursor: pointer;
        font-size: 14 * 5.12px;
        display: inline-block;
        text-align: left;
      }
      span:nth-last-child(1) {
        border: 0;
      }
    }
  }

  .footer-copyright {
    margin-top: 12 * 5.12px;
    font-size: 14 * 5.12px;
    color: 455363;
  }
}
</style>
