<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 date">{{ report.date }}</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=FiEE&match=starts-with&filenum=&State=&Country=&SIC=&myowner=exclude&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: "2024 Annual Report",
    date: "April 10, 2025",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000182912625002538/fieeinc_10k.htm",
  },
  {
    fileName: "2023 Annual Report",
    date: "April 12, 2024",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000182912624002449/miniminc_10k.htm",
  },
  {
    fileName: "2022 Annual Report",
    date: "March 31, 2023",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000149315223010335/form10-k.htm",
  },
  {
    fileName: "2021 Annual Report",
    date: "March 31, 2022",
    downloadUrl:
      "https://www.sec.gov/ix?doc=/Archives/edgar/data/1467761/000149315222008365/form10-k.htm",
  },
  {
    fileName: "2020 Annual Report",
    date: "April 13, 2021",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495421004133/zmtp_10k.htm",
  },
  {
    fileName: "2019 Annual Report",
    date: "April 15, 2020",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495420004069/zmtp_10k.htm",
  },
  {
    fileName: "2018 Annual Report",
    date: "April 1, 2019",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495419003878/zmtp_10k.htm",
  },
  {
    fileName: "2017 Annual Report",
    date: "March 30, 2018",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495418003402/zmtp_10k.htm",
  },
  {
    fileName: "2016 Annual Report",
    date: "March 22, 2017",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000165495417002279/zmtp_10k.htm",
  },
  {
    fileName: "2015 Annual Report",
    date: "March 15, 2016",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448816006596/zmtp_10k.htm",
  },
  {
    fileName: "2014 Annual Report",
    date: "March 24, 2015",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448815001308/zmtp_10k.htm",
  },
  {
    fileName: "2013 Annual Report",
    date: "March 31, 2014",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448814001518/zmpt_10k.htm",
  },
  {
    fileName: "2012 Annual Report",
    date: "March 29, 2013",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448813001584/zmtp_10k.htm",
  },
  {
    fileName: "2011 Annual Report",
    date: "March 30, 2012",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448812001548/zoom_10k.htm",
  },
  {
    fileName: "2010 Annual Report",
    date: "March 29, 2011",
    downloadUrl:
      "https://www.sec.gov/Archives/edgar/data/1467761/000135448811000969/zmtp_10k.htm",
  },
  {
    fileName: "2009 Annual Report",
    date: "March 31, 2010",
    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: calc(100% - 300px);
  margin: 0 auto;
  padding: 20px;
}

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

.section {
  margin-bottom: 60px;
}

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

.overview-text {
  font-size: 40px;
  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;
  justify-content: space-between;
}

.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: 40px;
  line-height: 1.6;
}

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

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