<template>
  <div class="page-container">
    <div class="financials-container">
      <!-- 标题 -->
      <div class="financials-title">
        {{ t("financialinformation.secfilings.title") }}
      </div>

      <!-- 公司财务概览 -->
      <section class="section">
        <div class="section-title">
          {{ t("financialinformation.secfilings.overview.title") }}
        </div>
        <p
          class="overview-text"
          v-html="t('financialinformation.secfilings.overview.desc')"
        ></p>
      </section>

      <!-- 年度报告 -->
      <section class="section">
        <div class="section-title">
          {{ t("financialinformation.secfilings.annual_reports.title") }}
        </div>

        <!-- 报告表格 -->
        <div class="reports-table">
          <div class="table-header">
            <div class="column file-name">
              {{
                t("financialinformation.secfilings.annual_reports.file_name")
              }}
            </div>
            <div class="column date">
              {{ t("financialinformation.secfilings.annual_reports.date") }}
            </div>
            <div class="column download"></div>
          </div>

          <!-- 报告列表 -->
          <div class="reports-list">
            <div
              class="table-row"
              v-for="(report, index) in annualReports"
              :key="index"
            >
              <div class="column file-name">{{ report.fileName }}</div>
              <div class="column download">
                <a :href="report.downloadUrl" class="download-link">{{
                  t("financialinformation.secfilings.annual_reports.view")
                }}</a>
              </div>
            </div>
          </div>
        </div>
      </section>

      <!-- SEC文件 -->
      <section class="section">
        <div class="section-title">
          {{ t("financialinformation.secfilings.sec.title") }}
        </div>
        <p class="sec-text">
          {{ t("financialinformation.secfilings.sec.desc") }}
          <a
            href="https://www.sec.gov/cgi-bin/browse-edgar?company=&CIK=NCTY&filenum=&State=&SIC=&owner=include&action=getcompany"
            class="link"
            >{{ t("financialinformation.secfilings.sec.click_here") }}</a
          >.
        </p>
      </section>
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import { useI18n } from "vue-i18n";

const { t } = useI18n();

// 年度报告数据
const annualReports = ref([
  {
    fileName: "2025-04-10",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000182912625002538/fieeinc_10k.htm",
  },
  {
    fileName: "2024-04-12",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000182912624002449/miniminc_10k.htm",
  },
  {
    fileName: "2023-03-31",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000149315223010335/form10-k.htm",
  },
  {
    fileName: "2022-03-31",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000149315222008365/form10-k.htm",
  },
  {
    fileName: "2021-04-13",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495421004133/zmtp_10k.htm",
  },
  {
    fileName: "2020-04-15",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495420004069/zmtp_10k.htm",
  },
  {
    fileName: "2019-04-01",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495419003878/zmtp_10k.htm",
  },
  {
    fileName: "2018-03-30",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495418003402/zmtp_10k.htm",
  },
  {
    fileName: "2017-03-22",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495417002279/zmtp_10k.htm",
  },
  {
    fileName: "2016-03-15",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448816006596/zmtp_10k.htm",
  },
  {
    fileName: "2015-03-24",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448815001308/zmtp_10k.htm",
  },
  {
    fileName: "2014-03-31",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448814001518/zmpt_10k.htm",
  },
  {
    fileName: "2013-03-29",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448813001584/zmtp_10k.htm",
  },
  {
    fileName: "2012-03-30",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448812001548/zoom_10k.htm",
  },
  {
    fileName: "2011-03-29",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448811000969/zmtp_10k.htm",
  },
  {
    fileName: "2010-03-31",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448810001043/zmtp_10k.htm",
  },
]);
</script>

<style scoped lang="scss">
.page-container {
  background-image: url("@/assets/image/bg.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.financials-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.financials-title {
  font-size: 40px;
  text-align: center;
  margin-bottom: 60px;
  color: #333;
}

.section {
  margin-bottom: 60px;
}

.section-title {
  font-size: 18px;
  margin-bottom: 20px;
  color: #333;
}

.overview-text {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 30px;
}

.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  border-bottom: 2px solid transparent;

  &.active {
    border-bottom: 2px solid #333;
  }
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
}

.table-header {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid #ccc;
  font-weight: bold;
}

.table-row {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
  justify-content: space-between;
}
.reports-list {
  // max-height: 600px;
  // overflow-y: auto;
}
.column {
  &.file-name {
    width: 25%;
  }
  &.date {
    width: 25%;
  }

  &.download {
    width: 25%;
    text-align: right;
    margin-right: 50px;
  }
}

.pdf-icon {
  width: 36px;
  height: 36px;
}

.download-link {
  color: #0078d7;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

.sec-text {
  font-size: 16px;
  line-height: 1.6;
}

.link {
  color: #f00;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}
</style>
