<template>
  <a-layout-footer class="footer">
    <div class="mx-auto max-w-screen-xl px-4 py-10">
      <a-row :gutter="[24, 24]">
        <a-col :xs="24" :md="8">
          <div class="text-base font-semibold text-white">关注我们</div>
          <div class="mt-4 flex items-center gap-4">
            <a-avatar shape="square" :size="96" />
            <div class="text-sm leading-6 text-gray-400">
              公众号/小程序
              <br />
              获取最新动态
            </div>
          </div>
        </a-col>

        <a-col :xs="24" :md="8">
          <div class="text-base font-semibold text-white">快速入口</div>
          <div class="mt-4 grid gap-2 text-sm text-gray-400">
            <NuxtLink class="hover:text-white" to="/platform">平台能力</NuxtLink>
            <NuxtLink class="hover:text-white" to="/products">产品矩阵</NuxtLink>
            <NuxtLink class="hover:text-white" to="/market">模板/插件市场</NuxtLink>
            <NuxtLink class="hover:text-white" to="/deploy">部署方案</NuxtLink>
          </div>
        </a-col>

        <a-col :xs="24" :md="8">
          <div class="text-base font-semibold text-white">备案信息</div>
          <div class="mt-4 text-sm text-gray-400">{{ icpText }}</div>
        </a-col>
      </a-row>

      <div class="mt-10 border-t border-white/10 pt-6 text-xs text-gray-500">
        © {{ year }} {{ siteName }}. All rights reserved.
      </div>
    </div>
  </a-layout-footer>
</template>

<script setup lang="ts">
const { data: siteInfo } = useSiteInfo()
const siteName = computed(() => String((siteInfo.value as any)?.data?.websiteName || '网宿软件'))
const icpText = computed(() => {
  const icp = (siteInfo.value as any)?.data?.icpNo
  return icp ? `备案号：${icp}` : '备案号：'
})
const year = new Date().getFullYear()
</script>

<style scoped>
.footer {
  background: #000;
  padding: 0;
}
</style>

