<template>
  <footer class="rest-copyright" :style="{ color }">
    <div class="copyright-box">
      <span>Copyright</span>
      <solar-copyright-linear></solar-copyright-linear>
      <span>行知智学 {{ fullYear }}</span>
    </div>
    <div class="register-box">
      <a href="https://beian.miit.gov.cn/" type="primary" target="_blank" rel="noopener noreferrer">{{ register }}</a>
    </div>
  </footer>
</template>

<script setup lang="ts">
  import SolarCopyrightLinear from '~icons/solar/copyright-linear';
  defineProps({
    /** 文字的颜色 */
    color: { type: String, default: 'var(--el-text-color-regular)' },
  });

  const fullYear = new Date().getFullYear();
  const register = ref('渝ICP备18009097号-1');
</script>

<style lang="scss" scoped>
  .rest-copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    .copyright-box {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .register-box {
      margin-left: 20px;
    }
  }
</style>
