// Loan product content (source: "Website- Landing page text.pdf").
// FAQ texts from that document are intentionally not included here.

export type LoanValue =
  | string
  | string[] // plain lines
  | { bullets: string[]; note?: string };

export type LoanField = {
  label: string;
  value: LoanValue;
  full?: boolean; // span both columns
};

export type LoanIconKey =
  | "consumer"
  | "business"
  | "auto"
  | "digital"
  | "green"
  | "trust"
  | "women";

export type LoanProduct = {
  id: LoanIconKey;
  title: string;
  desc: string;
  term: LoanValue;
  amount: LoanValue;
  rate: LoanValue;
  apr: LoanValue;
  fee: LoanValue;
  collateral: LoanValue;
  extra?: LoanField[];
  docs: LoanValue;
  docsLabel?: string;
  /** Hide the "How to apply" (Зээл хүсэхэд) section in the popup. */
  hideHowTo?: boolean;
  requirements: LoanValue;
};

export type LoanLabels = {
  term: string;
  amount: string;
  rate: string;
  apr: string;
  fee: string;
  collateral: string;
  docs: string;
  requirements: string;
  howTo: string;
};

type LoanContent = {
  labels: LoanLabels;
  howTo: string[];
  products: LoanProduct[];
};

const mn: LoanContent = {
  labels: {
    term: "Хугацаа",
    amount: "Хэмжээ",
    rate: "Жилийн хүү",
    apr: "Зээлийн бодит өртөг (жилийн)",
    fee: "Үйлчилгээний шимтгэл",
    collateral: "Барьцаа",
    docs: "Бүрдүүлэх материал",
    requirements: "Тавигдах шаардлага",
    howTo: "Зээл хүсэхэд",
  },
  howTo: [
    "Өөрийн хэрэгцээнд тохирсон бүтээгдэхүүнээ сонгон хүсэлт гаргана.",
    "Шаардлагатай мэдээлэл, баримт бичгээ бүрдүүлнэ.",
    "Бид таны орлого, зээл төлөх чадвар, зээлийн түүх болон барьцаа хөрөнгийг судалж, хүсэлтийг шийдвэрлэнэ.",
    "Зээл батлагдсан тохиолдолд нөхцөл, төлбөрийн хуваарьтай танилцаж, гэрээ байгуулна.",
  ],
  products: [
    {
      id: "consumer",
      title: "Хэрэглээний зээл",
      desc: "Хувийн болон өрхийн хэрэгцээгээ санхүүжүүлэхэд зориулсан зээл.",
      term: "36 сар хүртэл",
      amount: "100 сая ₮ хүртэл",
      rate: ["30.0–36.0%", "Барьцаагүй бол 42.0%"],
      apr: ["30.0–36.8%", "Барьцаагүй бол 42.83%"],
      fee: "0–1.0%",
      collateral:
        "Үл хөдлөх хөрөнгө, хөдлөх хөрөнгө болон шаардлага хангасан бусад хөрөнгө",
      docs: {
        bullets: [
          "Иргэний үнэмлэх, холбогдох e-Mongolia лавлагаа",
          "Орлого нотлох баримт, дансны хуулга",
          "Барьцаатай бол хөрөнгийн холбогдох баримт бичиг.",
        ],
      },
      requirements: {
        bullets: [
          "Зургаан сараас доошгүй хугацааны тогтмол цалин эсхүл бизнесийн орлоготой байх.",
          "Орлого, зээл төлөх чадвараа баримтаар нотлох боломжтой байх.",
          "Чанаргүй зээлийн үлдэгдэл болон хугацаа хэтэрсэн өр төлбөргүй байх.",
          "Өр, орлогын харьцаа нь зохицуулагч байгууллагын хүчин төгөлдөр шаардлагад нийцсэн байх.",
        ],
      },
    },
    {
      id: "business",
      title: "Бизнесийн зээл",
      desc: "Бизнесийн эргэлтийн хөрөнгөө нэмэгдүүлэх, тоног төхөөрөмж худалдан авах, үйлдвэрлэл, үйлчилгээ болон үйл ажиллагаагаа өргөжүүлэхэд зориулсан зээл.",
      term: [
        "Эргэлтийн хөрөнгө: 36 сар хүртэл",
        "Хөрөнгө оруулалт: 60 сар хүртэл",
        "Зээлийн шугам: 24 сар хүртэл",
      ],
      amount: "1 тэрбум ₮ хүртэл",
      rate: ["30.0–36.0%", "Барьцаагүй бол 42.0%"],
      apr: ["30.0–36.8%", "Барьцаагүй бол 42.83%"],
      fee: [
        "0–1.0%",
        "Зээлийн шугамын ашиглаагүй эрхийн үлдэгдэлд жилийн 3.6–6.0%-ийн нөөцлөн баталгаажуулсны шимтгэл тооцно.",
      ],
      collateral:
        "Үл хөдлөх хөрөнгө, автомашин, тоног төхөөрөмж болон шаардлага хангасан бусад хөрөнгө",
      extra: [
        {
          label: "Өөрөөс санхүүжүүлэх",
          value: "Хөрөнгө оруулалтын зээлийн нийт санхүүжилтийн 30%-иас доошгүй",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "Иргэний үнэмлэх, холбогдох e-Mongolia лавлагаа",
          "Орлого нотлох баримт, дансны хуулга",
          "Бизнесийн үйл ажиллагаа болон барьцаа хөрөнгийн баримт бичиг.",
          "Хуулийн этгээд бол улсын бүртгэлийн гэрчилгээ, дүрэм, эрх бүхий этгээдийн мэдээллийг нэмэлтээр бүрдүүлнэ.",
        ],
      },
      requirements: {
        bullets: [
          "Зургаан сараас доошгүй хугацаанд тогтвортой бизнес эрхэлсэн байх.",
          "Орлого, зээл төлөх мөнгөн урсгалаа баримтаар нотлох.",
          "Чанаргүй зээлийн үлдэгдэл болон хугацаа хэтэрсэн өр төлбөргүй байх.",
        ],
      },
    },
    {
      id: "auto",
      title: "Автомашины зээл",
      desc: "Автомашин худалдан авахад зориулсан зээл.",
      term: "48 сар хүртэл",
      amount: "100 сая ₮ хүртэл",
      rate: "30.0–36.0%",
      apr: "30.0%–36.65%",
      fee: "0–1.0%",
      collateral: "Худалдан авах эсвэл өөрийн өмчлөлийн автомашин",
      extra: [
        {
          label: "Урьдчилгаа",
          value:
            "Автомашин худалдан авах зээлд хүчин төгөлдөр зохицуулалтын шаардлагын дагуу тогтооно",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "Иргэний үнэмлэх, холбогдох e-Mongolia лавлагаа",
          "Орлого нотлох баримт",
          "Автомашины гэрчилгээ, үнэлгээ болон холбогдох баримт бичиг.",
        ],
      },
      requirements: {
        bullets: [
          "Орлого, зээл төлөх чадвараа баримтаар нотлох.",
          "Чанаргүй зээлийн үлдэгдэл болон хугацаа хэтэрсэн өр төлбөргүй байх.",
          "Өр, орлогын харьцаа нь зохицуулагч байгууллагын хүчин төгөлдөр шаардлагад нийцсэн байх.",
          "Автомашин нь өмчлөх эрхийн зөрчил, маргаангүй, давхар барьцаалаагүй, техникийн бүрэн бүтэн байдалтай байх.",
        ],
      },
    },
    {
      id: "digital",
      title: "Цахим зээл",
      desc: "Хувийн болон өрхийн хэрэгцээгээ санхүүжүүлэх барьцаагүй зээлийг SendMN аппликейшнээр хүсээрэй. Таны баталгаажсан цалин эсхүл мөнгөн гуйвуулгын мэдээлэлд үндэслэн зээлийн эрхийг тогтооно.",
      term: "1, 2, 3, 4 эсхүл 6 сар",
      amount: {
        bullets: [
          "Цалингийн орлого 3 сая ₮ хүртэл",
          "Шилжүүлсэн мөнгөн гуйвуулгад үндэслэн 10 сая ₮ хүртэл",
          "Хүлээн авсан мөнгөн гуйвуулгад үндэслэн 4 сая ₮ хүртэл",
        ],
        note: "Танд олгох зээлийн эрхийг орлого, өр төлбөр, зээлийн түүх болон зээлжих зэрэглэлд үндэслэн тогтооно.",
      },
      rate: "30.0%–36.0%",
      apr: "30.0%–36.05%",
      fee: "0%",
      collateral: "Шаардахгүй",
      extra: [
        { label: "Зээлийн эрх тогтоох хураамж", value: "1,500 ₮" },
        { label: "Эргэн төлөлт", value: "Сар бүр тэнцүү төлбөрөөр" },
        { label: "Хугацаа сунгах", value: "Боломжгүй", full: true },
      ],
      docsLabel: "Бүрдүүлэх мэдээлэл",
      docs: {
        bullets: [
          "SendMN аппликейшнд зээлийн анкетаа бөглөж, хувийн болон орлого баталгаажуулах мэдээлэл, холбогдох зөвшөөрлийг өгнө.",
          "Сүүлийн гурван сарын дансны хуулгыг хавсаргана.",
        ],
      },
      requirements: {
        bullets: [
          "Монгол Улсын 18 насанд хүрсэн иргэн байх.",
          "Улаанбаатар хотод оршин суудаг байх.",
          "SendMN аппликейшнд бүртгүүлж, мэдээллээ баталгаажуулсан байх.",
          "Сүүлийн хоёр жилийн хугацаанд зээлийн хугацаа хэтэрсэн түүхгүй, одоо хугацаа хэтэрсэн зээлийн үлдэгдэлгүй байх.",
          "Орлогын болон зээл төлөх чадварын шалгуурыг хангасан байх.",
        ],
      },
    },
    {
      id: "green",
      title: "Ногоон зээл",
      desc: "Байгаль орчинд эерэг нөлөөтэй, ногоон зээлийн шалгуур хангасан төсөл, хөрөнгө оруулалт болон хэрэглээг санхүүжүүлэхэд зориулсан зээл.",
      term: "Зориулалт, хөрөнгийн ашиглалтын хугацаа, санхүүжилтийн эх үүсвэр болон зээл төлөх чадварт үндэслэн тогтооно",
      amount: {
        bullets: ["Иргэн: 50 сая ₮ хүртэл", "Хуулийн этгээд: 500 сая ₮ хүртэл"],
      },
      rate: "30.0%",
      apr: "30.0%",
      fee: "0%",
      collateral:
        "Үл хөдлөх хөрөнгө, хөдлөх хөрөнгө болон шаардлага хангасан бусад хөрөнгө",
      docs: "Зээлийн хүсэлт, иргэний үнэмлэх эсхүл хуулийн этгээдийн бүртгэлийн баримт, орлого болон барьцааны баримтаас гадна ногоон зориулалтыг нотлох холбогдох материалыг бүрдүүлнэ.",
      requirements:
        "Зээлийн ерөнхий шалгуураас гадна санхүүжүүлэх төсөл, худалдан авалт нь манай ногоон зээлийн ангилал, шалгуурыг хангасан байна.",
    },
    {
      id: "trust",
      title: "Итгэлцэл барьцаалсан зээл",
      desc: "Манайд байршуулсан итгэлцлийн хөрөнгөө барьцаалан санхүүгийн хэрэгцээгээ хангах боломж.",
      term: "Итгэлцлийн гэрээний үлдсэн хугацаанаас хэтрэхгүй",
      amount: "Итгэлцлийн хөрөнгийн үлдэгдлийн 85% хүртэл",
      rate: "30.0%",
      apr: "30.0%",
      fee: "0%",
      collateral: "Сэнд Эм Эн ББСБ-д байршуулсан итгэлцлийн хөрөнгө",
      extra: [
        {
          label: "Эргэн төлөлт",
          value:
            "Сар бүр хүү төлөх эсхүл хугацааны эцэст төлөх нөхцөлийг гэрээгээр тохирно",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "Иргэний үнэмлэх, зээлийн хүсэлт.",
          "Хуулийн этгээдийн хүсэлтэд холбогдох бүртгэл, төлөөлөх эрхийн баримтыг нэмж бүрдүүлнэ.",
        ],
      },
      requirements:
        "Итгэлцлийн гэрээ хүчин төгөлдөр, хугацаа дуусаагүй, хөрөнгийг барьцаалах эрхтэй байна.",
    },
    {
      id: "women",
      hideHowTo: true,
      title: "Бизнес эрхлэгч эмэгтэйчүүдийг дэмжих зээл",
      desc: "Бизнес эрхлэгч эмэгтэйчүүдийн эргэлтийн хөрөнгө, тоног төхөөрөмж, хөрөнгө оруулалт болон үйл ажиллагааны санхүүжилтэд зориулсан зээл.",
      term: ["Эргэлтийн хөрөнгө: 36 сар хүртэл", "Хөрөнгө оруулалт: 60 сар хүртэл"],
      amount: "500 сая ₮ хүртэл",
      rate: "30.0%",
      apr: "30.0%",
      fee: "0%",
      collateral:
        "Үл хөдлөх хөрөнгө, хөдлөх хөрөнгө болон шаардлага хангасан бусад хөрөнгө",
      docs: {
        bullets: [
          "Иргэний үнэмлэх, холбогдох e-Mongolia лавлагаа",
          "Орлого нотлох баримт, бизнесийн үйл ажиллагаа, зээлийн зориулалт болон барьцааны баримт бичиг",
          "Хуулийн этгээд бол улсын бүртгэлийн гэрчилгээ, дүрэм, хувьцаа эзэмшлийн бүтэц, эрх бүхий этгээдийн мэдээллийг бүрдүүлнэ.",
        ],
      },
      requirements: {
        bullets: [
          "Бизнес эрхлэгч эмэгтэй эсхүл нийт хувьцааны 50%-иас дээш хувийг эмэгтэй хувьцаа эзэмшигч эзэмшдэг, Монгол Улсад бүртгэлтэй хуулийн этгээд байх.",
          "Зургаан сараас доошгүй хугацаанд тогтвортой бизнес эрхэлсэн байх.",
          "Орлого, зээл төлөх мөнгөн урсгалаа баримтаар нотлох боломжтой байх.",
          "Чанаргүй зээлийн үлдэгдэл болон хугацаа хэтэрсэн өр төлбөргүй байх.",
        ],
      },
    },
  ],
};

const en: LoanContent = {
  labels: {
    term: "Loan Term",
    amount: "Loan Amount",
    rate: "Annual Interest Rate",
    apr: "Annual Percentage Rate (APR)",
    fee: "Service Fee",
    collateral: "Collateral",
    docs: "Required Documents",
    requirements: "Eligibility Requirements",
    howTo: "How to Apply for a Loan",
  },
  howTo: [
    "Choose the loan product that best suits your needs and submit an application.",
    "Prepare and submit the required information and documents.",
    "We will assess your income, repayment capacity, credit history, and collateral before making a lending decision.",
    "If your loan is approved, review the loan terms and repayment schedule, then sign the loan agreement.",
  ],
  products: [
    {
      id: "consumer",
      title: "Consumer Loan",
      desc: "A loan designed to finance your personal and household needs.",
      term: "Up to 36 months",
      amount: "Up to MNT 100 million",
      rate: ["30.0–36.0%", "Unsecured loans: 42.0%"],
      apr: ["30.0–36.8%", "Unsecured loans: 42.83%"],
      fee: "0–1.0%",
      collateral: "Real estate, movable property, and other eligible assets.",
      docs: {
        bullets: [
          "National ID card and relevant e-Mongolia certificates.",
          "Proof of income and bank statements.",
          "For secured loans, relevant collateral documentation.",
        ],
      },
      requirements: {
        bullets: [
          "Must have received a regular salary or business income for at least 6 months.",
          "Must be able to provide supporting documents verifying income and loan repayment capacity.",
          "Must have no outstanding non-performing loans or overdue debts.",
          "Debt-to-income ratio must comply with the applicable regulatory requirements.",
        ],
      },
    },
    {
      id: "business",
      title: "Business Loan",
      desc: "A loan designed to increase your business working capital, purchase equipment, and expand your production, services, and business operations.",
      term: [
        "Working Capital: Up to 36 months",
        "Investment: Up to 60 months",
        "Credit Line: Up to 24 months",
      ],
      amount: "Up to MNT 1 billion",
      rate: ["30.0–36.0%", "Unsecured loans: 42.0%"],
      apr: ["30.0–36.8%", "Unsecured loans: 42.83%"],
      fee: [
        "0–1.0%",
        "An annual commitment fee of 3.6–6.0% applies to the unused portion of the credit line.",
      ],
      collateral: "Real estate, vehicles, equipment, and other eligible assets.",
      extra: [
        {
          label: "Borrower's Contribution",
          value: "At least 30% of the total investment financing amount.",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "National ID card and relevant e-Mongolia certificates.",
          "Proof of income and bank statements.",
          "Documents related to business operations and collateral assets.",
          "For legal entities, additional documents are required, including the state registration certificate, company charter, and information on authorized representatives.",
        ],
      },
      requirements: {
        bullets: [
          "Must have operated a stable business for at least 6 months.",
          "Must provide supporting documents verifying income and cash flow sufficient for loan repayment.",
          "Must have no outstanding non-performing loans or overdue debts.",
        ],
      },
    },
    {
      id: "auto",
      title: "Auto Loan",
      desc: "A loan designed to finance the purchase of a vehicle.",
      term: "Up to 48 months",
      amount: "Up to MNT 100 million",
      rate: "30.0–36.0%",
      apr: "30.0–36.65%",
      fee: "0–1.0%",
      collateral:
        "The vehicle being purchased or a vehicle already owned by the borrower.",
      extra: [
        {
          label: "Down Payment",
          value:
            "The down payment for vehicle purchase loans will be determined in accordance with applicable regulatory requirements.",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "National ID card and relevant e-Mongolia certificates.",
          "Proof of income.",
          "Vehicle registration certificate, valuation report, and other relevant documents.",
        ],
      },
      requirements: {
        bullets: [
          "Must provide supporting documents verifying income and loan repayment capacity.",
          "Must have no outstanding non-performing loans or overdue debts.",
          "Debt-to-income ratio must comply with applicable regulatory requirements.",
          "The vehicle must have clear ownership, be free from legal disputes and existing liens, and be in good mechanical condition.",
        ],
      },
    },
    {
      id: "digital",
      title: "Digital Loan",
      desc: "Apply for an unsecured loan through the SendMN app to finance your personal and household needs. Your loan eligibility and limit will be determined based on your verified salary or remittance history.",
      term: "1, 2, 3, 4, or 6 months",
      amount: {
        bullets: [
          "Salary Income: Up to MNT 3 million",
          "Based on Sent Remittances: Up to MNT 10 million",
          "Based on Received Remittances: Up to MNT 4 million",
        ],
        note: "Your loan eligibility and limit will be determined based on your income, outstanding debts, credit history, and credit score.",
      },
      rate: "30.0%–36.0%",
      apr: "30.0%–36.05%",
      fee: "0%",
      collateral: "Not required",
      extra: [
        { label: "Loan Eligibility Assessment Fee", value: "MNT 1,500" },
        { label: "Repayment Terms", value: "Equal monthly installments" },
        { label: "Loan Term Extension", value: "Not available", full: true },
      ],
      docsLabel: "Required Information",
      docs: {
        bullets: [
          "Complete the loan application in the SendMN app, provide the required personal and income verification information, and grant the necessary consents.",
          "Attach your bank statements for the last three months.",
        ],
      },
      requirements: {
        bullets: [
          "Must be a Mongolian citizen aged 18 or older.",
          "Must reside in Ulaanbaatar.",
          "Must be registered on the SendMN app with verified personal information.",
          "Must have no history of overdue loan payments in the past two years and no currently overdue loan balances.",
          "Must meet the income and loan repayment capacity requirements.",
        ],
      },
    },
    {
      id: "green",
      title: "Green Loan",
      desc: "A loan designed to finance environmentally beneficial projects, investments, and purchases that meet green lending criteria.",
      term: "Determined based on the loan purpose, useful life of the financed assets, funding sources, and repayment capacity.",
      amount: {
        bullets: [
          "Individuals: Up to MNT 50 million",
          "Legal Entities: Up to MNT 500 million",
        ],
      },
      rate: "30.00%",
      apr: "30.00%",
      fee: "0%",
      collateral: "Real estate, movable property, and other eligible assets.",
      docs: "Loan application, national ID card or legal entity registration documents, proof of income, collateral documentation, and relevant supporting documents demonstrating the loan's eligible green purpose.",
      requirements:
        "In addition to the general loan eligibility requirements, the project or purchase being financed must meet our green loan classification and eligibility criteria.",
    },
    {
      id: "trust",
      title: "Trust Secured Loan",
      desc: "Meet your financial needs by using your trust funds held with us as collateral.",
      term: "Not exceeding the remaining term of the trust agreement",
      amount: "Up to 85% of your trust fund balance",
      rate: "30.00%",
      apr: "30.00%",
      fee: "0%",
      collateral: "Trust funds held with SendMN NBFI LLC",
      extra: [
        {
          label: "Repayment Terms",
          value:
            "Interest may be paid monthly or at maturity, as agreed in the loan agreement.",
          full: true,
        },
      ],
      docs: {
        bullets: [
          "National ID card and loan application.",
          "For legal entities, additional registration documents and proof of authorized representation are required.",
        ],
      },
      requirements:
        "The trust agreement must be valid and unexpired, and the borrower must have the right to pledge the trust funds as collateral.",
    },
    {
      id: "women",
      hideHowTo: true,
      title: "Women Entrepreneurs Loan",
      desc: "A loan designed to support women entrepreneurs by financing working capital, equipment purchases, investments, and business operations.",
      term: ["Working Capital: Up to 36 months", "Investment: Up to 60 months"],
      amount: "Up to MNT 500 million",
      rate: "30.00%",
      apr: "30.00%",
      fee: "0%",
      collateral: "Real estate, movable property, and other eligible assets.",
      docs: {
        bullets: [
          "National ID card and relevant e-Mongolia certificates.",
          "Proof of income and documents related to business operations, loan purpose, and collateral.",
          "For legal entities, additional documents are required, including the state registration certificate, company charter, shareholding structure, and information on authorized representatives.",
        ],
      },
      requirements: {
        bullets: [
          "Must be a woman entrepreneur or a legal entity registered in Mongolia in which women shareholders own more than 50% of the total shares.",
          "Must have operated a stable business for at least 6 months.",
          "Must be able to provide supporting documents verifying income and cash flow sufficient for loan repayment.",
          "Must have no outstanding non-performing loans or overdue debts.",
        ],
      },
    },
  ],
};

export const LOAN_CONTENT: Record<"mn" | "en", LoanContent> = { mn, en };

export const getLoanContent = (lang: string): LoanContent =>
  lang.startsWith("mn") ? mn : en;
