<script setup lang="ts">
import { siteConfig } from '~/config/site'

const { filing } = siteConfig
</script>

<template>
  <footer class="py-6 text-center text-sm border-t" style="color: var(--color-text-secondary); border-color: var(--color-border);">
    <p>
      &copy; {{ new Date().getFullYear() }} {{ siteConfig.siteName }}
      <template v-if="filing.icp">
        &nbsp;·&nbsp;
        <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer" class="hover:opacity-70 whitespace-nowrap" style="border-bottom: 1px solid var(--color-text-secondary); padding-bottom: 1px;">{{ filing.icp }}</a>
      </template>
      <template v-if="filing.publicSecurity.code">
        &nbsp;·&nbsp;
        <a :href="`https://beian.mps.gov.cn/#/query/webSearch?code=${filing.publicSecurity.code}`" rel="noreferrer" target="_blank" class="hover:opacity-70 whitespace-nowrap" style="border-bottom: 1px solid var(--color-text-secondary); padding-bottom: 1px;">
          <span class="inline-flex items-center gap-0.5">
            <img src="@/assets/备案图标.png" alt="" class="w-3 h-3" />
            <span>{{ filing.publicSecurity.label }}{{ filing.publicSecurity.code }}号</span>
          </span>
        </a>
      </template>
    </p>
  </footer>
</template>
