// FAQData.swift
// Emoney Info
//
// Model data untuk halaman FAQ.
// Untuk menambah/mengubah pertanyaan, cukup edit array `FAQData.all` di bawah.

import Foundation

// MARK: - Model

struct FAQCategory {
    let id: String          // unik, dipakai untuk filter
    let icon: String        // SF Symbol name
    let title: String       // judul dalam bahasa aktif
    let items: [FAQItem]
}

struct FAQItem {
    let question: String
    let answer: String
}

// MARK: - Content

enum FAQData {

    /// Semua kategori FAQ. Tambah/ubah konten di sini.
    static var all: [FAQCategory] {[
        FAQCategory(
            id: "card",
            icon: "creditcard.fill",
            title: L10n.faqCategoryCard,
            items: [
                FAQItem(
                    question: L10n.faqQ_cardCompatible,
                    answer: L10n.faqA_cardCompatible
                ),
                FAQItem(
                    question: L10n.faqQ_cardNotDetected,
                    answer: L10n.faqA_cardNotDetected
                ),
                FAQItem(
                    question: L10n.faqQ_cardReadFailed,
                    answer: L10n.faqA_cardReadFailed
                ),
            ]
        ),
        FAQCategory(
            id: "transaction",
            icon: "arrow.left.arrow.right",
            title: L10n.faqCategoryTransaction,
            items: [
                FAQItem(
                    question: L10n.faqQ_txNotShown,
                    answer: L10n.faqA_txNotShown
                ),
                FAQItem(
                    question: L10n.faqQ_txExportPDF,
                    answer: L10n.faqA_txExportPDF
                ),
            ]
        ),
        FAQCategory(
            id: "balance",
            icon: "dollarsign.circle.fill",
            title: L10n.faqCategoryBalance,
            items: [
                FAQItem(
                    question: L10n.faqQ_balanceWrong,
                    answer: L10n.faqA_balanceWrong
                ),
                FAQItem(
                    question: L10n.faqQ_balanceTopup,
                    answer: L10n.faqA_balanceTopup
                ),
            ]
        ),
        FAQCategory(
            id: "app",
            icon: "info.circle.fill",
            title: L10n.faqCategoryApp,
            items: [
                FAQItem(
                    question: L10n.faqQ_appLanguage,
                    answer: L10n.faqA_appLanguage
                ),
                FAQItem(
                    question: L10n.faqQ_appMaskNumber,
                    answer: L10n.faqA_appMaskNumber
                ),
            ]
        ),
    ]}
}
