import { setRequestLocale } from "next-intl/server";
import { FadeIn } from "@/components/magicui/fade-in";

export default async function TermsPage({
  params,
}: {
  params: Promise<{ locale: string }>;
}) {
  const { locale } = await params;
  setRequestLocale(locale);

  return (
    <main className="bg-gold-bg py-20 sm:py-28 text-ink">
      <div className="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8">
        <FadeIn>
          {locale === "zh" ? (
            <div className="space-y-8">
              <h1 className="font-serif text-4xl font-bold text-ink sm:text-5xl border-b border-gold/15 pb-4">
                条款与条件
              </h1>
              <p className="text-sm leading-relaxed text-muted">
                欢迎访问 PT Original Nest Indonesia 网站。使用本网站以及向我们发出询价/订单，即表示您同意并遵守以下条款与条件。
              </p>
              
              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">1. 知识产权</h2>
                <p className="text-sm leading-relaxed text-muted">
                  本网站上的所有内容，包括文本、图像、徽标、图表和代码，均为 PT Original Nest Indonesia 的专有财产，并受国际版权法保护。
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">2. 产品信息与询价</h2>
                <p className="text-sm leading-relaxed text-muted">
                  我们会尽力确保网站上的产品描述、规格与图片的准确性。然而，所有的询价和订单将以最终的合同及发票条款为准。
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">3. 出口合规</h2>
                <p className="text-sm leading-relaxed text-muted">
                  作为印尼合法的燕窝出口商，我们确保所有出口货运符合印尼及目的国（如中国、新加坡、美国等）的动植物检疫及食品安全标准与检验规范。
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">4. 适用法律</h2>
                <p className="text-sm leading-relaxed text-muted">
                  因使用本网站或与我们交易而引起的任何争议，均应受印度尼西亚共和国法律的管辖，并依此进行解释。
                </p>
              </div>
            </div>
          ) : locale === "id" ? (
            <div className="space-y-8">
              <h1 className="font-serif text-4xl font-bold text-ink sm:text-5xl border-b border-gold/15 pb-4">
                Syarat & Ketentuan
              </h1>
              <p className="text-sm leading-relaxed text-muted">
                Selamat datang di situs web PT Original Nest Indonesia. Dengan mengakses situs web ini dan melakukan inquiry/pemesanan kepada kami, Anda setuju untuk terikat dan mematuhi Syarat & Ketentuan berikut.
              </p>
              
              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">1. Hak Kekayaan Intelektual</h2>
                <p className="text-sm leading-relaxed text-muted">
                  Semua konten di situs web ini, termasuk teks, gambar, logo, diagram, dan kode pemrograman adalah hak milik eksklusif PT Original Nest Indonesia dan dilindungi oleh undang-undang hak cipta yang berlaku.
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">2. Informasi Produk & Penawaran</h2>
                <p className="text-sm leading-relaxed text-muted">
                  Kami berupaya memastikan semua informasi produk, spesifikasi, dan visualisasi gambar di situs ini akurat. Namun, semua rincian inquiry dan transaksi komersial resmi akan diatur secara hukum melalui Invoice dan Kontrak Penjualan.
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">3. Kepatuhan Ekspor</h2>
                <p className="text-sm leading-relaxed text-muted">
                  Sebagai eksportir resmi sarang burung walet dari Indonesia, kami menjamin seluruh pengiriman produk kami telah lolos uji karantina serta memenuhi regulasi impor negara tujuan (Tiongkok, Singapura, Amerika Serikat, dll).
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">4. Hukum yang Berlaku</h2>
                <p className="text-sm leading-relaxed text-muted">
                  Setiap perselisihan atau klaim hukum yang timbul sehubungan dengan penggunaan situs web ini akan diatur dan tunduk pada hukum Negara Republik Indonesia.
                </p>
              </div>
            </div>
          ) : (
            <div className="space-y-8">
              <h1 className="font-serif text-4xl font-bold text-ink sm:text-5xl border-b border-gold/15 pb-4">
                Terms & Conditions
              </h1>
              <p className="text-sm leading-relaxed text-muted">
                Welcome to the website of PT Original Nest Indonesia. By accessing this website and submitting inquiries or orders, you agree to be bound by and comply with the following Terms & Conditions.
              </p>
              
              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">1. Intellectual Property</h2>
                <p className="text-sm leading-relaxed text-muted">
                  All content on this website, including text, images, logos, graphics, and code, is the exclusive property of PT Original Nest Indonesia and is protected by international copyright laws.
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">2. Product Information & Inquiries</h2>
                <p className="text-sm leading-relaxed text-muted">
                  We strive to ensure the accuracy of all product descriptions, specifications, and images. However, official commercial details are governed by the Sales Contract and Invoice agreements.
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">3. Export Compliance</h2>
                <p className="text-sm leading-relaxed text-muted">
                  As a licensed exporter, we guarantee that all edible bird&apos;s nest shipments fully comply with Indonesian quarantine regulations and the import compliance of target destination countries (China, Singapore, USA, etc.).
                </p>
              </div>

              <div className="space-y-4">
                <h2 className="font-serif text-2xl font-bold text-ink">4. Governing Law</h2>
                <p className="text-sm leading-relaxed text-muted">
                  Any disputes or claims arising out of the use of this website or commercial interaction shall be governed by and construed in accordance with the laws of the Republic of Indonesia.
                </p>
              </div>
            </div>
          )}
        </FadeIn>
      </div>
    </main>
  );
}
