import { loanCatalog } from "@/content/loan-catalog";

export const dynamic = "force-static";

export function GET() {
  const body = [
    "# MaxCredit",
    "",
    "> Information about MaxCredit's loan services and its Singapore office.",
    "",
    "The service information below is generated from the website's published content. Contact MaxCredit for current terms and application questions.",
    "",
    "## Loan information",
    ...loanCatalog.map(
      (loan) =>
        `- [${loan.metadataTitle}](https://maxcredit.sg/loan-information/${loan.slug}.md): Published introduction and frequently asked questions.`,
    ),
    "",
    "## Company and contact",
    "- [About MaxCredit](https://maxcredit.sg/about): Company information.",
    "- [Contact MaxCredit](https://maxcredit.sg/contact): Office address, directions and contact details.",
    "",
    "## Optional",
    "- [Homepage](https://maxcredit.sg/): Overview of available services.",
    "- [Full text](https://maxcredit.sg/llms-full.txt): The company, contact and loan information above in one file.",
    "",
  ].join("\n");
  return new Response(body, {
    headers: { "Content-Type": "text/plain; charset=utf-8" },
  });
}
