export const APP_LOCALE_COOKIE = "app_locale";
export const appLocales = ["id", "en"] as const;
export type AppLocale = (typeof appLocales)[number];

export function isAppLocale(value: string | null | undefined): value is AppLocale {
  return value === "id" || value === "en";
}

export function normalizeLocale(value: string | null | undefined): AppLocale {
  return isAppLocale(value) ? value : "id";
}

export const dictionaries = {
  id: {
    common: {
      reset: "Reset",
      search: "Cari",
      exportExcel: "Export Excel",
      save: "Simpan",
      edit: "Edit",
      detail: "Detail",
      delete: "Hapus",
      cancel: "Batal",
      cancelEdit: "Batal edit",
      loading: "Memuat data...",
      processing: "Memproses...",
      requestFailed: "Permintaan gagal",
      sendSuccess: "Email berhasil dikirim.",
      formReset: "Reset form",
      notes: "Catatan",
      actions: "Aksi",
      status: "Status",
      date: "Tanggal",
      qty: "Qty",
      total: "Total",
      supplier: "Supplier",
      warehouse: "Gudang",
      location: "Lokasi",
      itemType: "Item Type",
      itemGrade: "Grade",
      unit: "Unit",
      user: "User",
      logout: "Logout",
      logoutConfirm: "Yakin ingin logout dari aplikasi?",
      logoutModalTitle: "Konfirmasi Keluar",
      logoutModalDescription:
        "Apakah Anda yakin ingin keluar dari sistem? Pastikan semua pekerjaan Anda telah disimpan.",
      logoutNow: "Keluar Sekarang",
      settings: "Pengaturan",
      changePassword: "Ganti Password",
      help: "Bantuan",
      backToLogin: "Kembali ke login",
      continueToLogin: "Lanjut ke login"
    },
    shell: {
      searchPlaceholder: "Cari lot, supplier, purchase..."
    },
    navigation: {
      "/dashboard": "Dashboard",
      "/users": "Pengguna",
      "/audit-trail": "Jejak Audit",
      "/change-password": "Ganti Password",
      "/help": "Bantuan",
      "/agents": "Agen",
      "/sales": "Sales",
      "/buyers": "Pembeli",
      "/grades": "Grade",
      "/warehouses": "Gudang",
      "/warehouse-locations": "Lokasi Gudang",
      "/adjustment-reasons": "Alasan Penyesuaian",
      "/stock-adjustments": "Penyesuaian Stok",
      "/banks": "Bank",
      "/couriers": "Jasa Pengiriman",
      "/washing-places": "Tempat Cuci",
      "/currencies": "Mata Uang",
      "/profit-share-schemes": "Skema Bagi Hasil",
      "/units": "Satuan",
      "/settings": "Pengaturan Sistem",
      "/purchases": "Pembelian Reguler",
      "/purchases/office-buyout": "Pembelian Kantor / Buyout Agen",
      "/fund-requests": "Permintaan Dana",
      "/washing": "Pencucian",
      "/purchase-analysis": "Analisis Pembelian",
      "/purchase-realization": "Realisasi Pembelian",
      "/receipts": "Penerimaan",
      "/lots": "Lot Persediaan",
      "/barcode/lookup": "Pencarian Barcode",
      "/sorting": "Mixing Lot",
      "/sales-allocation": "Alokasi Penjualan",
      "/sales-regular": "Penjualan Reguler",
      "/sales-jit": "Penjualan JIT",
      "/consignments": "Titip Jual"
    },
    navigationGroups: {
      "master-data": "Master Data",
      purchases: "Pembelian",
      "stock-activities": "Aktivitas Stok",
      "outbound-transactions": "Transaksi Keluar",
      settings: "Pengaturan"
    },
    pages: {
      "/dashboard": {
        title: "Dashboard Operasional",
        description:
          "Status real-time lot persediaan, transaksi masuk, dan titik perhatian operasional gudang walet."
      },
      "/users": {
        title: "Pengguna",
        description: "Kelola akun pengguna aplikasi, verifikasi email, dan reset password paksa."
      },
      "/audit-trail": {
        title: "Jejak Audit",
        description:
          "Jejak login, pengelolaan user, dan perubahan transaksi penting dengan filter waktu, action, dan user."
      },
      "/change-password": {
        title: "Ganti Password",
        description:
          "Perbarui password akun Anda dengan memasukkan password saat ini lalu simpan password baru."
      },
      "/help": {
        title: "Bantuan",
        description:
          "Panduan singkat untuk akses akun, verifikasi email, reset password, dan kontak bantuan operasional."
      },
      "/agents": {
        title: "Agen",
        description:
          "Master agen untuk menyimpan identitas, rekening, saldo berjalan, dan skema bagi hasil."
      },
      "/sales": {
        title: "Sales",
        description:
          "Master sales untuk menyimpan identitas, rekening, dan saldo berjalan."
      },
      "/employees": {
        title: "Karyawan",
        description:
          "Master karyawan untuk referensi kontak operasional dan administrasi."
      },
      "/grades": {
        title: "Grade",
        description:
          "Master grade baru untuk migrasi ke struktur satu grade dengan pembeda mangkok dan standar harga."
      },
      "/buyers": {
        title: "Master Pembeli",
        description:
          "Master pembeli menjadi basis transaksi penjualan, analisis margin, dan ketertelusuran ke pembeli akhir."
      },
      "/warehouses": {
        title: "Gudang",
        description:
          "Master gudang untuk penerimaan, penempatan lot, transfer, dan laporan stok."
      },
      "/warehouse-locations": {
        title: "Lokasi Gudang",
        description: "Master lokasi rak, area, atau zona penyimpanan di dalam gudang."
      },
      "/adjustment-reasons": {
        title: "Alasan Penyesuaian",
        description: "Master alasan untuk penyesuaian, penyusutan, kehilangan, dan kerusakan."
      },
      "/stock-adjustments": {
        title: "Penyesuaian Stok",
        description:
          "Koreksi qty lot untuk penyusutan, kerusakan, kehilangan, atau penambahan stok dengan riwayat alasan yang jelas."
      },
      "/settings": {
        title: "Pengaturan Sistem",
        description:
          "Konfigurasi perusahaan, email, numbering transaksi, keamanan, dan preferensi aplikasi."
      },
      "/fund-requests": {
        title: "Permintaan Dana",
        description:
          "Catat transfer dana modal atau bagi hasil ke agen, lengkap dengan rekening tujuan, snapshot rekening kantor, dan bukti transfer."
      },
      "/banks": {
        title: "Bank",
        description:
          "Master bank untuk dipilih pada data pembeli agar input pembayaran lebih konsisten."
      },
      "/couriers": {
        title: "Jasa Pengiriman",
        description:
          "Master jasa pengiriman untuk referensi pengiriman, penjemputan, dan kontak operasional."
      },
      "/washing-places": {
        title: "Tempat Cuci",
        description:
          "Master tempat cuci dengan alamat, kontak utama, dan daftar kontak PIC."
      },
      "/profit-share-schemes": {
        title: "Skema Bagi Hasil",
        description:
          "Master skema bagi hasil untuk mendefinisikan porsi agen dan perusahaan dengan total 100%."
      },
      "/currencies": {
        title: "Mata Uang",
        description:
          "Master mata uang yang dipakai di pengaturan sistem dan referensi finansial aplikasi."
      },
      "/units": {
        title: "Satuan",
        description: "Master satuan yang dipakai lintas transaksi persediaan."
      },
      "/purchases": {
        title: "Pembelian Reguler",
        description:
          "Modul ini menangani pembelian reguler multi-baris dengan status DRAFT dan SUBMITTED untuk barang masuk biasa."
      },
      "/washing": {
        title: "Pencucian",
        description:
          "Kirim lot ke tempat cuci, simpan biaya dan resi, lalu selesaikan hasil cuci dengan pembaruan berat, grade, dan lokasi gudang."
      },
      "/purchase-analysis": {
        title: "Analisis Pembelian",
        description:
          "Analisis batch pembelian untuk memadukan berat beli, penerimaan, hasil lot, biaya operasional, dan laba rugi agen."
      },
      "/purchase-realization": {
        title: "Realisasi Pembelian",
        description:
          "Pantau hasil aktual pembelian sampai penutupan: qty tersisa, pendapatan, penyusutan, buyout kantor, dan laba rugi final agen."
      },
      "/receipts": {
        title: "Penerimaan",
        description:
          "Penerimaan memverifikasi barang datang, menetapkan qty final, lalu membentuk lot persediaan."
      },
      "/lots": {
        title: "Lot Persediaan",
        description:
          "Lot adalah sumber data utama untuk stok aktif, biaya perolehan, hubungan induk-turunannya, dan ketertelusuran."
      },
      "/sorting": {
        title: "Mixing Lot / Ubah Grade",
        description:
          "Campurkan beberapa lot aktif menjadi lot hasil baru dengan grade baru, lalu simpan jejak masuk-keluar secara penuh."
      },
      "/sales-allocation": {
        title: "Alokasi Penjualan",
        description:
          "Pesanan penjualan akan mengambil stok dari satu atau banyak lot, lalu menghitung biaya total berdasarkan alokasi aktual."
      },
      "/barcode/lookup": {
        title: "Pencarian Barcode",
        description:
          "Pencarian berbasis QR/barcode dipakai untuk penelusuran cepat, transfer gudang, dan verifikasi pengambilan barang."
      },
      "/reports/stock-summary": {
        title: "Laporan Ringkasan Stok",
        description:
          "Laporan dibangun dari alur transaksi inti yang sudah stabil, dimulai dari ringkasan stok per jenis, grade, dan gudang."
      }
    },
    login: {
      title: "Selamat Datang Kembali",
      subtitle: "Masuk ke AbelBirdnest Stock untuk mengelola lot inventaris Anda.",
      description: "Solusi manajemen stok profesional dengan traceability lot yang presisi.",
      identity: "Email atau Username",
      password: "Kata Sandi",
      remember: "Ingat perangkat ini",
      loginNow: "Masuk Sekarang",
      useHelper: "Gunakan form bantuan di bawah",
      helpTitle: "Bantuan Login",
      helpCopy:
        "Gunakan email terdaftar untuk menerima link reset password atau kirim ulang verifikasi email.",
      helpEmail: "Email Bantuan",
      sendReset: "Kirim link reset",
      resendVerification: "Kirim ulang verifikasi",
      noAccount: "Belum memiliki akun operasional?",
      contactAdmin: "Hubungi Admin",
      support: "Bantuan",
      privacy: "Kebijakan Privasi",
      terms: "Syarat & Ketentuan",
      devAccounts: "Akun default untuk development",
      autoFillHint: "Klik salah satu role untuk mengisi form login otomatis."
    },
    purchases: {
      overline: "Transaksi",
      createTitle: "Buat Pembelian",
      editTitle: "Edit Pembelian",
      helper:
        "Draft pembelian multi-baris dengan grade, satuan, harga, dan status klasifikasi.",
      masterWarning:
        "Lengkapi master agen, grade, dan satuan terlebih dulu sebelum membuat pembelian.",
      purchaseDate: "Tanggal Pembelian",
      supplierInvoice: "Invoice Pemasok",
      lineItems: "Baris Barang",
      addLine: "Tambah baris",
      courier: "Jasa Pengiriman",
      chooseSupplier: "Pilih pemasok",
      chooseItemType: "Pilih grade",
      optional: "Opsional",
      buyPrice: "Harga Beli",
      classification: "Klasifikasi",
      lineNotes: "Catatan Baris",
      removeLine: "Hapus baris",
      subtotal: "Subtotal",
      grandTotalDraft: "Total draft",
      saveDraft: "Simpan draft",
      submit: "Ajukan",
      listTitle: "Daftar Pembelian",
      listCopy: "Draft, diajukan, dan dibatalkan.",
      noData: "Belum ada pembelian. Buat draft pertama dari form di sebelah kiri.",
      cancelConfirm: "Batalkan pembelian ini?",
      deleteDraftOrCancelledConfirm: "Hapus draft/dibatalkan ini?",
      loadingError: "Gagal memuat data pembelian",
      detailError: "Gagal memuat detail pembelian",
      saveError: "Gagal menyimpan pembelian",
      cancelError: "Gagal membatalkan pembelian",
      deleteError: "Gagal menghapus draft pembelian",
      line: "Baris"
    },
    washingModule: {
      overline: "Proses",
      title: "Pencucian",
      helper: "Kelola lot yang dikirim ke tempat cuci, biaya pencucian, resi, dan penyelesaian hasil cuci.",
      createTitle: "Buat Pencucian",
      editTitle: "Edit Pencucian",
      receiptHint: "Resi pencucian bisa diganti selama status belum selesai.",
      lotSelected: "Lot terpilih",
      lot: "Lot",
      washingPlace: "Tempat Cuci",
      cost: "Biaya Pencucian",
      duration: "Durasi Cuci (jam)",
      receipt: "Resi Pencucian",
      completeTitle: "Selesai Cuci",
      startingQty: "awal",
      afterQty: "Berat Setelah Dicuci",
      changeGrade: "Ubah Grade (opsional)",
      destinationWarehouse: "Gudang Tujuan",
      warehouseLocation: "Lokasi Gudang",
      saveCompletion: "Simpan penyelesaian",
      completionHint:
        "Pilih proses pencucian yang belum selesai untuk input berat akhir, perubahan grade, dan perpindahan lokasi gudang.",
      listTitle: "Daftar Pencucian",
      listCopy: "Pantau lot yang sedang dicuci, biaya pencucian, dan hasil akhir setelah pencucian.",
      countSuffix: "pencucian",
      noData: "Belum ada data pencucian.",
      processColumn: "Pencucian",
      placeColumn: "Tempat",
      costColumn: "Biaya",
      qtyColumn: "Qty",
      viewReceipt: "Lihat resi",
      noReceipt: "Belum ada resi",
      notDone: "Belum selesai",
      finalQty: "Akhir",
      doneAction: "Selesai cuci",
      shrinkage: "Susut",
      loadError: "Gagal memuat data pencucian",
      saveError: "Gagal menyimpan data pencucian",
      completeError: "Gagal menyelesaikan proses pencucian"
    },
    regularSales: {
      overline: "Penjualan Reguler",
      title: "Buat penjualan reguler",
      helper:
        "Saat disimpan, stok lot langsung keluar dari gudang. Saat penjualan ditutup, retur akan kembali ke lot asal dan selisih otomatis masuk ke penyusutan.",
      code: "Kode",
      codeAuto: "Otomatis saat disimpan",
      saleDate: "Tanggal penjualan",
      buyer: "Pembeli",
      chooseBuyer: "Pilih pembeli",
      buyerCurrency: "Mata uang pembeli",
      chooseBuyerCurrency: "Pilih mata uang pembeli",
      companyCurrency: "Mata uang perusahaan",
      chooseCompanyCurrency: "Pilih mata uang perusahaan",
      buyerRate: "Kurs pembeli ke perusahaan",
      shippingCost: "Biaya kirim",
      shippingEquivalent: "Biaya kirim ekuivalen",
      shippingReceipt: "Resi pengiriman",
      notes: "Catatan",
      soldItems: "Barang yang dijual",
      soldItemsCopy: "Setiap baris mewakili satu lot yang keluar untuk pembeli.",
      addProduct: "Tambah produk",
      sellWeight: "Berat jual",
      currentWeight: "Berat sekarang",
      currentSellWeight: "Berat saat jual",
      outgoingWeight: "Berat keluar",
      returnWeight: "Berat retur",
      shrinkageWeight: "Berat susut",
      malPrice: "Harga MAL",
      sellingPrice: "Harga jual",
      plannedSellingPrice: "Harga jual rencana",
      actualSellingPrice: "Harga jual aktual",
      agentShare: "Bagi hasil agen",
      itemNotes: "Catatan item",
      totalNominal: "Total nominal",
      totalEquivalent: "Total nominal ekuivalen",
      totalAgentCommission: "Total komisi agen",
      listTitle: "Daftar penjualan reguler",
      listCopy: "Pantau transaksi in progress dan yang sudah ditutup penuh.",
      noData: "Belum ada penjualan reguler",
      noDataCopy: "Buat transaksi pertama untuk mulai mencatat penjualan reguler.",
      detailLoading: "Memuat detail penjualan reguler...",
      detailEmpty: "Pilih transaksi untuk melihat detail dan menyelesaikan seluruh item penjualan.",
      closingTitle: "Area Penutupan",
      rate: "Kurs",
      buyerCompanyCurrency: "Mata uang pembeli / perusahaan",
      viewFile: "Lihat file",
      autoShrinkageHint:
        "Jika berat jual aktual + retur kurang dari berat jual, selisih otomatis dicatat sebagai penyusutan:",
      closeDate: "Tanggal penyelesaian",
      updateReceipt: "Update resi pengiriman",
      closeAll: "Tutup seluruh penjualan",
      saveLabel: "Simpan penjualan"
    },
    jitSales: {
      overline: "Penjualan Just In Time",
      title: "Buat penjualan just in time",
      helper: "Barang dibeli dan langsung dijual kembali tanpa masuk gudang dan tanpa proses retur.",
      code: "Kode",
      codeAuto: "Otomatis saat disimpan",
      saleDate: "Tanggal penjualan",
      buyer: "Pembeli",
      chooseBuyer: "Pilih pembeli",
      buyerCurrency: "Mata uang pembeli",
      companyCurrency: "Mata uang perusahaan",
      courier: "Jasa Pengiriman",
      chooseCourier: "Pilih jasa pengiriman",
      shippingCost: "Biaya kirim",
      buyerRate: "Kurs pembeli ke perusahaan",
      uploadReceipt: "Unggah resi",
      headerNotes: "Catatan header",
      soldItems: "Barang yang dijual",
      soldItemsCopy: "Tiap baris mewakili satu grade yang dibeli lalu langsung dijual kembali.",
      addProduct: "Tambah produk",
      quantity: "Kuantitas",
      grade: "Grade",
      chooseGrade: "Pilih grade",
      malPrice: "Harga MAL",
      sellingPrice: "Harga jual",
      agentOptional: "Agen (opsional)",
      noAgent: "Tanpa agen",
      shareScheme: "Skema bagi hasil",
      chooseScheme: "Pilih skema",
      plannedNominal: "Nominal rencana",
      plannedAgentCommission: "Komisi agen rencana",
      totalNominal: "Total nominal",
      totalEquivalent: "Total nominal ekuivalen",
      totalAgentCommission: "Total komisi agen",
      saveLabel: "Simpan penjualan JIT",
      listTitle: "Daftar penjualan just in time",
      listCopy: "Pantau transaksi yang masih terbuka dan yang sudah ditutup penuh.",
      noData: "Belum ada penjualan just in time",
      noDataCopy: "Buat transaksi pertama untuk mulai mencatat penjualan langsung beli-jual.",
      detailLoading: "Memuat detail penjualan just in time...",
      detailEmpty: "Pilih transaksi untuk melihat detail dan menyelesaikan seluruh item penjualan.",
      closingTitle: "Area Penutupan",
      actualNominal: "Nominal aktual",
      closeDate: "Tanggal tutup",
      actualSellingPrice: "Harga jual aktual",
      uploadCloseReceipt: "Unggah / ganti resi saat tutup",
      totalBuyerNominal: "Total nominal pembeli",
      totalCompanyNominal: "Total nominal perusahaan",
      closeAll: "Tutup penjualan JIT"
    },
    purchaseAnalysisModule: {
      listTitle: "Daftar Batch Pembelian",
      listCopy: "Lembar analisis per pembelian untuk memantau berat, kadar, biaya, dan laba rugi.",
      countSuffix: "pembelian",
      noData: "Belum ada pembelian",
      noDataCopy:
        "Buat pembelian dulu. Setelah itu data pembelian dan lot akan memberi dasar angka untuk analisis.",
      loadingDetail: "Memuat detail analisis...",
      emptyDetail: "Pilih pembelian untuk membuka lembar analisis.",
      overline: "Analisis Pembelian",
      totalPurchase: "Total pembelian",
      itemWeight: "Berat",
      profitLoss: "Laba/Rugi",
      operational: "Operasional",
      finalAnalysis: "Analisis final",
      draftAnalysis: "Masih draft",
      saveLabel: "Simpan analisis",
      operationalCostTitle: "Biaya operasional",
      operationalCostCopy:
        "Tambahkan ongkos sortir, handling, transport, atau biaya lain di luar modal barang.",
      addCost: "Tambah biaya",
      costType: "Tipe biaya",
      costDescription: "Deskripsi",
      amount: "Nominal",
      delete: "Hapus",
      analysisNotes: "Catatan analisis"
    },
    purchaseRealizationModule: {
      listTitle: "Daftar Realisasi Pembelian",
      listCopy: "Pantau status penutupan pembelian dan laba/rugi final.",
      searchLabel: "Cari pembelian",
      searchPlaceholder: "No. pembelian, agen, status",
      allStatuses: "Semua status",
      noResults: "Tidak ada hasil",
      noResultsCopy: "Ubah kata kunci atau filter status untuk melihat realisasi pembelian lain.",
      emptyDetail: "Pilih pembelian",
      emptyDetailCopy:
        "Pilih salah satu pembelian di kiri untuk melihat status realisasi dan linimasa kejadian.",
      overline: "Realisasi Pembelian",
      closingStatus: "Status Penutupan",
      closedOn: "Ditutup",
      noAgentScheme: "Tanpa skema agen",
      qtyRemaining: "Qty Tersisa",
      revenue: "Pendapatan",
      profitLoss: "Laba/Rugi",
      agentProfit: "Profit Agen",
      qtySold: "Qty Terjual",
      qtyReturned: "Qty Retur",
      qtyShrinkage: "Qty Susut",
      agentShare: "Porsi Agen %",
      purchaseInfo: "Info Pembelian",
      openingCost: "Modal awal",
      additionalCost: "Biaya tambahan",
      totalRevenue: "Total pendapatan",
      financialSummary: "Ringkasan Keuangan",
      eventTimeline: "Linimasa Kejadian",
      loadingDetail: "Memuat detail...",
      noEvents: "Belum ada kejadian realisasi",
      noEventsCopy:
        "Kejadian akan muncul setelah pembelian diproses, dicuci, dijual, dibuyout, atau mengalami mutasi terkait realisasi.",
      openSource: "Buka dokumen asal",
      qtyIn: "Qty Masuk",
      qtyOut: "Qty Keluar",
      shrinkage: "Susut",
      cost: "Biaya",
      expense: "Beban",
      profit: "Laba"
    },
    consignments: {
      overline: "Titip Jual",
      title: "Buat transaksi titip jual",
      helper:
        "Pilih sales, pembeli, lalu tentukan lot yang keluar dibawa sales. Sistem akan langsung mengurangi stok tersedia agar posisi barang tetap bisa ditelusuri.",
      code: "Kode",
      codeAuto: "Otomatis saat disimpan",
      consignmentDate: "Tanggal titip",
      sales: "Sales",
      chooseSales: "Pilih sales",
      buyer: "Pembeli",
      chooseBuyer: "Pilih pembeli",
      soldItems: "Barang yang dititip",
      soldItemsCopy: "Setiap baris mewakili satu lot yang keluar dibawa sales.",
      addProduct: "Tambah produk",
      consignedWeight: "Berat dititip",
      currentWeight: "Berat sekarang",
      itemNotes: "Catatan item",
      saveLabel: "Simpan titip jual",
      listTitle: "Daftar titip jual",
      listCopy: "Pantau transaksi yang masih terbuka, tertutup sebagian, atau sudah selesai.",
      noData: "Belum ada titip jual",
      noDataCopy: "Buat transaksi titip jual pertama untuk mulai mencatat barang yang keluar dibawa sales.",
      detailLoading: "Memuat detail titip jual...",
      detailEmpty: "Pilih transaksi untuk melihat detail dan melakukan penutupan item.",
      closingTitle: "Penyelesaian Transaksi",
      salesBuyer: "Sales / Pembeli",
      qty: "Qty",
      currentAvailable: "Sisa tersedia sekarang",
      soldWeight: "Berat terjual",
      returnedWeight: "Berat kembali",
      soldPrice: "Harga jual",
      salesCommission: "Komisi sales",
      shrinkageAgentCommission: "Susut / komisi agen",
      agentCommissionFormula: "Rumus komisi agen:",
      agentCommissionFormulaValue:
        "((berat terjual * (harga jual - harga MAL)) - komisi sales) * persen bagi hasil agen",
      noAgentShare: "Nilai saat ini 0 karena lot ini tidak punya data bagi hasil agen.",
      autoShrinkage: "Berat susut otomatis:",
      autoAgentCommission: "Komisi agen otomatis:",
      noAgentShareShort: "tidak ada bagi hasil agen",
      closeItem: "Tutup item",
      closeDate: "Tanggal tutup",
      closedAt: "Tanggal tutup"
    },
    receipts: {
      overline: "Gudang",
      createTitle: "Buat Penerimaan",
      helper:
        "Pilih pembelian yang sudah diajukan, verifikasi qty diterima, lalu finalisasi untuk membuat lot.",
      choosePurchase: "Pilih pembelian yang diajukan",
      receiptDate: "Tanggal Penerimaan",
      receiptLines: "Baris Penerimaan",
      choosePurchaseToLoad: "Pilih pembelian untuk memuat baris barang.",
      qtyReceived: "Qty Diterima",
      qtyAccepted: "Qty Diterima Valid",
      qtyRejected: "Qty Ditolak",
      unitCost: "Biaya per Satuan",
      chooseWarehouse: "Pilih gudang",
      lineNotes: "Catatan Baris",
      saveDraft: "Simpan draft penerimaan",
      listTitle: "Daftar Penerimaan",
      listCopy: "Draft dan penerimaan yang sudah difinalkan.",
      noData: "Belum ada penerimaan.",
      generateLots: "Buat lot",
      loadingError: "Gagal memuat data penerimaan",
      detailError: "Gagal memuat detail penerimaan",
      createError: "Gagal membuat penerimaan",
      generateError: "Gagal membuat lot",
      finalized: "FINALIZED",
      draft: "DRAFT",
      lots: "Lot",
      purchase: "Pembelian",
      receipt: "Penerimaan"
    },
    lots: {
      overline: "Ketertelusuran",
      listTitle: "Daftar Lot Persediaan",
      listCopy:
        "Lot yang terbentuk dari penerimaan sekarang bisa ditinjau lengkap per pemasok, item, lokasi, dan umur simpan.",
      searchPlaceholder: "Cari lot, pemasok, item, atau gudang",
      snapshotTitle: "Ringkasan Lot",
      snapshotCopy: "Sumber data utama untuk stok aktif per lot.",
      noData: "Belum ada lot atau hasil pencarian kosong.",
      loadingError: "Gagal memuat lot",
      loading: "Memuat data lot...",
      code: "Kode Lot",
      cost: "Biaya",
      aging: "Umur Simpan",
      initialQty: "Awal",
      remainingQty: "Sisa",
      days: "hari",
      backToLots: "Kembali ke lot",
      notFound: "Lot tidak ditemukan",
      loadDetailError: "Gagal memuat detail lot",
      identity: "Identitas Lot",
      receivedAt: "Tanggal Diterima",
      quantityCost: "Kuantitas & Biaya",
      originalQty: "Qty Awal",
      availableQty: "Qty Tersedia",
      reservedQty: "Qty Dicadangkan",
      damagedQty: "Qty Rusak",
      shrinkageQty: "Qty Susut",
      storage: "Penyimpanan",
      labels: "Label",
      noLabels: "Belum ada label.",
      producedBy: "Dihasilkan Oleh Transformasi",
      usedIn: "Digunakan Dalam Transformasi",
      noProducedBy: "Lot ini belum tercatat sebagai hasil mixing/ubah grade.",
      noUsedIn: "Lot ini belum dipakai di transformasi lain.",
      parentLot: "Lot Induk",
      childLots: "Lot Turunan",
      usedQty: "Dipakai",
      producedQty: "Hasil"
    },
    stockAdjustments: {
      overline: "Kendali Gudang",
      createTitle: "Buat Penyesuaian Stok",
      helper:
        "Pakai qty negatif untuk susut atau kerusakan, dan qty positif untuk koreksi penambahan. Semua perubahan akan tercatat ke lot terkait.",
      chooseActiveLot: "Pilih lot aktif",
      adjustmentReason: "Alasan Penyesuaian",
      chooseReason: "Pilih alasan penyesuaian",
      adjustmentDate: "Tanggal Penyesuaian",
      adjustmentQty: "Qty Penyesuaian",
      adjustmentQtyPlaceholder: "-0.500 atau 0.500",
      save: "Simpan penyesuaian",
      historyTitle: "Riwayat Penyesuaian Stok",
      historyCopy: "Jejak susut, kerusakan, dan koreksi qty per lot.",
      noData: "Belum ada penyesuaian stok.",
      before: "Sebelum",
      after: "Sesudah",
      reason: "Alasan",
      category: "Kategori",
      available: "Tersedia",
      createError: "Gagal membuat penyesuaian",
      loadingError: "Gagal memuat data penyesuaian stok"
    },
    resetPassword: {
      title: "Reset Password",
      description: "Masukkan password baru Anda untuk melanjutkan login ke AbelBirdnest Stock.",
      tokenMissing: "Token reset password tidak ditemukan.",
      newPassword: "Password Baru",
      confirmPassword: "Konfirmasi Password Baru",
      saveNewPassword: "Simpan password baru",
      success: "Password berhasil direset.",
      failure: "Gagal reset password"
    },
    changePassword: {
      description: "Gunakan password saat ini untuk mengamankan perubahan password akun Anda.",
      currentPassword: "Password Saat Ini",
      newPassword: "Password Baru",
      confirmPassword: "Konfirmasi Password Baru",
      submit: "Simpan password baru",
      success: "Password berhasil diperbarui.",
      failure: "Gagal mengganti password",
      securityTitle: "Praktik keamanan",
      securityTips: [
        "Gunakan minimal 8 karakter dan hindari password yang pernah dipakai.",
        "Jangan bagikan password ke user lain walaupun satu divisi.",
        "Setelah mengganti password, simpan di password manager internal jika ada."
      ]
    },
    verifyEmail: {
      title: "Verifikasi Email",
      verifying: "Memverifikasi email...",
      tokenMissing: "Token verifikasi tidak ditemukan.",
      success: "Email berhasil diverifikasi.",
      failure: "Gagal verifikasi email"
    },
    dashboard: {
      purchaseVsSales: "Tren Pembelian vs Penjualan",
      purchaseVsSalesCopy: "Perbandingan qty pembelian dan qty penjualan 6 bulan terakhir.",
      purchaseVsReceipt: "Tren Pembelian vs Penjualan",
      purchaseVsReceiptCopy: "Perbandingan qty pembelian dan qty penjualan 6 bulan terakhir.",
      lastSixMonths: "6 bulan terakhir",
      purchases: "Pembelian",
      receipts: "Penerimaan",
      sales: "Penjualan",
      topPartners: "Mitra Utama",
      topPartnersCopy: "Supplier dengan stok aktif paling besar saat ini.",
      averageMargin: "Rata-rata margin",
      averageMarginCopy:
        "Efisiensi pemrosesan meningkat seiring kontrol kelembaban dan kualitas receipt yang lebih baik.",
      receiptAcceptance: "Tingkat serap penjualan",
      lotAgeDistribution: "Distribusi Umur Lot",
      recentActivity: "Aktivitas Terakhir",
      quickActions: "Aksi Cepat",
      quickActionsCopy: "Shortcut ke alur transaksi yang paling sering dipakai.",
      criticalLots: "Lot Perlu Perhatian",
      criticalLotsCopy: "Daftar lot yang perlu ditindaklanjuti karena stok rendah, usia terlalu lama, atau sedang ditahan.",
      lotCode: "Lot code",
      supplier: "Supplier",
      item: "Item",
      availableQty: "Qty tersedia",
      reason: "Alasan",
      status: "Status",
      lowStock: "Stok Rendah",
      aging: "Usia Tinggi",
      onHold: "Ditahan"
    },
    placeholder: {
      mode: "Mode",
      draftMode: "Draft operasional",
      backend: "Backend",
      backendReady: "Siap dihubungkan",
      uiTarget: "UI Target",
      followsStitch: "Mengikuti Stitch pack",
      initialScope: "Scope awal",
      upcomingFlow: "Alur yang akan diisi",
      upcomingFlowCopy: "Tampilan sementara ini mengikuti struktur screen final.",
      inputMain: "Input utama",
      validation: "Validasi",
      transactionOutput: "Output transaksi",
      placeholderBody:
        "Area ini akan diisi komponen form, tabel, dan aksi setelah modul inti berikutnya dikerjakan.",
      implementationNotes: "Catatan implementasi"
    },
    master: {
      overline: "Master data",
      code: "Code",
      name: "Nama",
      description: "Deskripsi",
      address: "Alamat",
      status: "Status",
      active: "ACTIVE",
      inactive: "INACTIVE",
      add: "Tambah",
      update: "Update",
      list: "Daftar",
      dataCount: "data",
      noData: "Belum ada data. Tambahkan data pertama dari form di sebelah kiri.",
      rankOrder: "Rank Order",
      saveError: "Gagal menyimpan data",
      loadError: "Gagal memuat data",
      deleteError: "Gagal menghapus data",
      confirmDeletePrefix: "Hapus"
    },
    users: {
      overline: "Admin access",
      createTitle: "Buat User Baru",
      createCopy:
        "User baru akan menerima email verifikasi. Sebelum email diverifikasi, user belum bisa login.",
      editTitle: "Edit User",
      editCopy:
        "Super admin dan admin dapat memperbarui data user. Jika email diubah, sistem akan kirim ulang verifikasi email.",
      name: "Nama",
      email: "Email",
      username: "Username",
      phone: "Phone",
      initialPassword: "Password Awal",
      role: "Role",
      status: "Status",
      create: "Buat user",
      listTitle: "User Aplikasi",
      listCopy: "Kelola user, verifikasi email, dan force reset password.",
      verified: "Verified",
      pending: "Pending",
      sendVerification: "Kirim verifikasi",
      forceReset: "Force reset",
      delete: "Hapus",
      createdMessage: "User dibuat dan email verifikasi sudah dikirim.",
      updatedMessage: "User berhasil diperbarui."
    },
    audit: {
      search: "Search",
      action: "Action",
      user: "User",
      fromDate: "Dari tanggal",
      toDate: "Sampai tanggal",
      allActions: "Semua action",
      allUsers: "Semua user",
      logTitle: "Log Aktivitas",
      logCopy:
        "Menampilkan jejak login, pengelolaan user, dan perubahan transaksi yang sudah direkam sistem.",
      record: "record",
      time: "Waktu",
      entity: "Entity",
      changes: "Perubahan",
      path: "Path",
      summary: "Ringkasan",
      noData: "Belum ada audit trail untuk filter ini.",
      pageOf: "Halaman",
      of: "dari",
      prev: "Prev",
      next: "Next",
      before: "Before",
      after: "After"
    },
    help: {
      title: "Pusat Bantuan",
      description:
        "Gunakan halaman ini untuk memahami akses akun, verifikasi email, dan langkah pemulihan password.",
      cards: [
        {
          title: "Verifikasi email",
          copy: "User baru wajib klik link verifikasi dari email sebelum bisa login ke aplikasi."
        },
        {
          title: "Lupa password",
          copy: "Gunakan tombol lupa password di halaman login untuk menerima link reset ke email terdaftar."
        },
        {
          title: "Akses ditolak",
          copy: "Jika menu tertentu tidak bisa dibuka, cek role akun Anda atau hubungi admin aplikasi."
        },
        {
          title: "Audit & keamanan",
          copy: "Semua aksi penting seperti login, reset password, dan perubahan transaksi tercatat di audit trail."
        }
      ],
      contactTitle: "Kontak bantuan",
      contactCopy: "Jika ada kendala operasional atau akses akun, kirimkan detail masalah ke kontak berikut.",
      contactLabel: "Email bantuan",
      securityNote:
        "Jangan kirim password aktif melalui email. Untuk reset akun, gunakan alur reset password atau minta admin melakukan force reset."
    },
    settings: {
      company: "Profil perusahaan",
      companyCopy: "Nama usaha, identitas brand, alamat, logo, dan timezone operasional.",
      email: "Email & notifikasi",
      emailCopy: "SMTP, verifikasi email user, reset password, dan alert operasional.",
      numbering: "Numbering & kode otomatis",
      numberingCopy: "Format nomor purchase, receipt, lot, adjustment, dan transformation.",
      security: "Keamanan & sesi",
      securityCopy: "Kebijakan password, session timeout, role access, dan audit retention.",
      preferences: "Bahasa & preferensi",
      preferencesCopy: "Default language, format tanggal, mata uang, dan perilaku UI dasar.",
      integration: "Integrasi",
      integrationCopy: "Export/import, webhook, dan koneksi eksternal jika nanti dibutuhkan.",
      runtimeTitle: "Konfigurasi runtime aplikasi",
      runtimeCopy:
        "Perubahan pada SMTP, bahasa default, timeout sesi, dan prefix transaksi akan dipakai oleh proses baru setelah disimpan.",
      loading: "Memuat pengaturan...",
      loadError: "Gagal memuat pengaturan",
      saveAll: "Simpan pengaturan",
      saveSuccess: "Pengaturan berhasil disimpan.",
      saveError: "Gagal menyimpan pengaturan",
      companyName: "Nama perusahaan",
      companyEmail: "Email perusahaan",
      companyPhone: "Telepon perusahaan",
      companyBankName: "Nama bank kantor",
      companyBankAccountNumber: "Nomor rekening kantor",
      companyBankAccounts: "Rekening kantor",
      addCompanyBankAccount: "Tambah rekening",
      companyAddress: "Alamat perusahaan",
      companyTimezone: "Timezone operasional",
      smtpHost: "SMTP host",
      smtpPort: "SMTP port",
      smtpUser: "SMTP username",
      smtpPassword: "SMTP password",
      smtpPasswordPlaceholder: "Kosongkan jika tidak ingin mengubah password SMTP",
      smtpFromName: "Nama pengirim email",
      smtpFromEmail: "Email pengirim",
      smtpSecure: "Gunakan koneksi secure (SSL/TLS)",
      purchasePrefix: "Prefix purchase",
      receiptPrefix: "Prefix receipt",
      lotPrefix: "Prefix lot",
      adjustmentPrefix: "Prefix stock adjustment",
      transformationPrefix: "Prefix transformation",
      fundRequestPrefix: "Prefix permintaan dana",
      washingPrefix: "Prefix pencucian",
      regularSalePrefix: "Prefix penjualan reguler",
      jitSalePrefix: "Prefix penjualan JIT",
      consignmentPrefix: "Prefix titip jual",
      defaultLanguage: "Bahasa default",
      currencyCode: "Kode mata uang",
      dateFormat: "Format tanggal",
      passwordMinLength: "Minimal panjang password",
      sessionTimeoutMinutes: "Session timeout (menit)",
      requireEmailVerification: "Wajib verifikasi email sebelum user bisa login",
      auditRetentionDays: "Retensi audit trail (hari)",
      currentScope: "Prioritas implementasi saat ini",
      currentScopeCopy:
        "Bagian ini menjadi pondasi agar konfigurasi sistem tidak bercampur dengan master data operasional.",
      nextPhase: "Tahap berikutnya",
      nextItems: [
        "Form profil perusahaan dan logo.",
        "Konfigurasi SMTP dan test email.",
        "Format numbering transaksi dan prefix lot.",
        "Bahasa default dan preferensi sistem.",
        "Kebijakan password dan session timeout."
      ]
    }
  },
  en: {
    common: {
      reset: "Reset",
      search: "Search",
      exportExcel: "Export Excel",
      save: "Save",
      edit: "Edit",
      detail: "Detail",
      delete: "Delete",
      cancel: "Cancel",
      cancelEdit: "Cancel edit",
      loading: "Loading data...",
      processing: "Processing...",
      requestFailed: "Request failed",
      sendSuccess: "Email sent successfully.",
      formReset: "Reset form",
      notes: "Notes",
      actions: "Actions",
      status: "Status",
      date: "Date",
      qty: "Qty",
      total: "Total",
      supplier: "Supplier",
      warehouse: "Warehouse",
      location: "Location",
      itemType: "Item Type",
      itemGrade: "Grade",
      unit: "Unit",
      user: "User",
      logout: "Logout",
      logoutConfirm: "Are you sure you want to log out of the application?",
      logoutModalTitle: "Confirm Sign Out",
      logoutModalDescription:
        "Are you sure you want to leave the system? Make sure all of your work has been saved.",
      logoutNow: "Sign Out Now",
      settings: "Settings",
      changePassword: "Change Password",
      help: "Help",
      backToLogin: "Back to login",
      continueToLogin: "Continue to login"
    },
    shell: {
      searchPlaceholder: "Search lot, supplier, purchase..."
    },
    navigation: {
      "/dashboard": "Dashboard",
      "/users": "Users",
      "/audit-trail": "Audit Trail",
      "/change-password": "Change Password",
      "/help": "Help",
      "/agents": "Agents",
      "/sales": "Sales",
      "/buyers": "Buyers",
      "/grades": "Grades",
      "/warehouses": "Warehouses",
      "/warehouse-locations": "Warehouse Locations",
      "/adjustment-reasons": "Adjustment Reasons",
      "/stock-adjustments": "Stock Adjustments",
      "/banks": "Banks",
      "/couriers": "Couriers",
      "/washing-places": "Washing Places",
      "/currencies": "Currencies",
      "/profit-share-schemes": "Profit Share Schemes",
      "/units": "Units",
      "/settings": "Settings",
      "/purchases": "Purchases",
      "/purchases/office-buyout": "Office Purchase / Agent Buyout",
      "/fund-requests": "Fund Request",
      "/washing": "Washing",
      "/purchase-analysis": "Purchase Analysis",
      "/purchase-realization": "Purchase Realization",
      "/receipts": "Receipts",
      "/lots": "Inventory Lots",
      "/barcode/lookup": "Barcode Lookup",
      "/sorting": "Lot Mixing",
      "/sales-allocation": "Sales Allocation",
      "/sales-regular": "Regular Sales",
      "/sales-jit": "JIT Sales",
      "/consignments": "Consignments"
    },
    navigationGroups: {
      "master-data": "Master Data",
      purchases: "Purchases",
      "stock-activities": "Stock Activities",
      "outbound-transactions": "Outbound Transactions",
      settings: "Settings"
    },
    pages: {
      "/dashboard": {
        title: "Operations Dashboard",
        description:
          "Real-time inventory lot status, inbound transactions, and key operational attention points."
      },
      "/users": {
        title: "Users",
        description: "Manage application users, email verification, and forced password resets."
      },
      "/audit-trail": {
        title: "Audit Trail",
        description:
          "Track logins, user administration, and critical transaction changes with action, user, and time filters."
      },
      "/change-password": {
        title: "Change Password",
        description:
          "Update your account password by entering your current password and saving the new one."
      },
      "/help": {
        title: "Help",
        description:
          "Quick guidance for account access, email verification, password reset, and operational support."
      },
      "/agents": {
        title: "Agents",
        description:
          "Agent master storing identities, bank accounts, current balance, and profit-sharing schemes."
      },
      "/sales": {
        title: "Sales",
        description:
          "Sales master storing identities, bank accounts, and current balance."
      },
      "/employees": {
        title: "Employees",
        description:
          "Employee master for operational and administrative contact references."
      },
      "/grades": {
        title: "Grades",
        description:
          "New grade master for migration into a single-grade structure with bowl flags and price standards."
      },
      "/buyers": {
        title: "Buyer Master",
        description:
          "The buyer master supports sales transactions, margin analysis, and end-buyer traceability."
      },
      "/warehouses": {
        title: "Warehouses",
        description:
          "Warehouse master for receiving, lot placement, transfers, and stock reporting."
      },
      "/warehouse-locations": {
        title: "Warehouse Locations",
        description: "Master rack, area, or zone locations within each warehouse."
      },
      "/adjustment-reasons": {
        title: "Adjustment Reasons",
        description: "Master reasons for adjustments, shrinkage, loss, and damage."
      },
      "/stock-adjustments": {
        title: "Stock Adjustments",
        description:
          "Adjust lot quantities for shrinkage, damage, loss, or stock additions with clear reason history."
      },
      "/settings": {
        title: "System Settings",
        description:
          "Configure company profile, email, transaction numbering, security, and application preferences."
      },
      "/fund-requests": {
        title: "Fund Request",
        description:
          "Record capital or profit-share transfers to agents, complete with destination account snapshots, company account snapshots, and transfer proof."
      },
      "/banks": {
        title: "Banks",
        description:
          "Bank master used by buyer forms to keep payment data consistent."
      },
      "/couriers": {
        title: "Couriers",
        description:
          "Courier master for shipping references, pickups, and operational contact details."
      },
      "/washing-places": {
        title: "Washing Places",
        description:
          "Washing place master with address, primary contacts, and multiple contact persons."
      },
      "/profit-share-schemes": {
        title: "Profit Share Schemes",
        description:
          "Master profit-sharing schemes defining the agent and company portions with a total of 100%."
      },
      "/currencies": {
        title: "Currencies",
        description:
          "Currency master used by system settings and future financial references in the app."
      },
      "/units": {
        title: "Units",
        description: "Master units used across inventory transactions."
      },
      "/purchases": {
        title: "Purchasing",
        description:
          "This module handles multi-line purchases with draft, submitted, and optional approval statuses."
      },
      "/washing": {
        title: "Washing",
        description:
          "Send lots to a washing place, store cost and receipt proof, then complete the result with weight, grade, and warehouse location updates."
      },
      "/purchase-analysis": {
        title: "Purchase Analysis",
        description:
          "Analyze purchase batches by combining buy weight, receipts, lot results, operational costs, and agent profit outcomes."
      },
      "/purchase-realization": {
        title: "Purchase Realization",
        description:
          "Track realized purchase performance through remaining qty, revenue, shrinkage, office buyout, and final agent profit/loss."
      },
      "/receipts": {
        title: "Receiving",
        description:
          "Receiving verifies incoming goods, confirms final quantity, and creates inventory lots."
      },
      "/lots": {
        title: "Inventory Lots",
        description:
          "Lots are the main source of truth for active stock, costing, parent-child lineage, and traceability."
      },
      "/sorting": {
        title: "Lot Mixing / Regrade Transformation",
        description:
          "Combine active lots into new result lots with new grades, then preserve full input-output traceability."
      },
      "/sales-allocation": {
        title: "Sales Allocation",
        description:
          "Sales orders can draw stock from one or many lots and calculate total cost from actual allocation."
      },
      "/barcode/lookup": {
        title: "Barcode Lookup",
        description:
          "QR/barcode-based lookup will support fast traceability, warehouse transfers, and picking verification."
      },
      "/reports/stock-summary": {
        title: "Stock Summary Report",
        description:
          "Reporting starts from a stable core transaction flow, beginning with stock summaries by item, grade, and warehouse."
      }
    },
    login: {
      title: "Welcome Back",
      subtitle: "Sign in to AbelBirdnest Stock to manage your inventory lots.",
      description: "Professional stock management with precise lot traceability.",
      identity: "Email or Username",
      password: "Password",
      remember: "Remember this device",
      loginNow: "Sign In Now",
      useHelper: "Use the support form below",
      helpTitle: "Login Support",
      helpCopy:
        "Use your registered email to receive a password reset link or resend email verification.",
      helpEmail: "Support Email",
      sendReset: "Send reset link",
      resendVerification: "Resend verification",
      noAccount: "No operational account yet?",
      contactAdmin: "Contact Admin",
      support: "Support",
      privacy: "Privacy Policy",
      terms: "Terms & Conditions",
      devAccounts: "Default development accounts",
      autoFillHint: "Click a role below to auto-fill the login form."
    },
    purchases: {
      overline: "Transaction",
      createTitle: "Create Purchase",
      editTitle: "Edit Purchase",
      helper:
        "Multi-line purchase draft with grade, unit, price, and classification status.",
      masterWarning:
        "Complete agent, grade, and unit master data before creating a purchase.",
      purchaseDate: "Purchase Date",
      supplierInvoice: "Supplier Invoice",
      lineItems: "Line Items",
      addLine: "Add line",
      courier: "Courier",
      chooseSupplier: "Choose supplier",
      chooseItemType: "Choose grade",
      optional: "Optional",
      buyPrice: "Buy Price",
      classification: "Classification",
      lineNotes: "Line Notes",
      removeLine: "Remove line",
      subtotal: "Subtotal",
      grandTotalDraft: "Draft grand total",
      saveDraft: "Save draft",
      submit: "Submit",
      listTitle: "Purchase List",
      listCopy: "Draft, submitted, and cancelled.",
      noData: "No purchases yet. Create the first draft from the form on the left.",
      cancelConfirm: "Cancel this purchase?",
      deleteDraftOrCancelledConfirm: "Delete this draft/cancelled purchase?",
      loadingError: "Failed to load purchase data",
      detailError: "Failed to load purchase detail",
      saveError: "Failed to save purchase",
      cancelError: "Failed to cancel purchase",
      deleteError: "Failed to delete draft purchase",
      line: "Line"
    },
    washingModule: {
      overline: "Process",
      title: "Washing",
      helper: "Manage lots sent to washing places, washing costs, receipt files, and final washing results.",
      createTitle: "Create Washing",
      editTitle: "Edit Washing",
      receiptHint: "The washing receipt can be replaced while the status is not completed.",
      lotSelected: "Selected lot",
      lot: "Lot",
      washingPlace: "Washing Place",
      cost: "Washing Cost",
      duration: "Washing Duration (hours)",
      receipt: "Washing Receipt",
      completeTitle: "Complete Washing",
      startingQty: "start",
      afterQty: "Weight After Washing",
      changeGrade: "Change Grade (optional)",
      destinationWarehouse: "Destination Warehouse",
      warehouseLocation: "Warehouse Location",
      saveCompletion: "Save completion",
      completionHint:
        "Select an unfinished washing process to enter final weight, grade changes, and warehouse location movement.",
      listTitle: "Washing List",
      listCopy: "Monitor lots being washed, washing costs, and final results after washing.",
      countSuffix: "washings",
      noData: "No washing data yet.",
      processColumn: "Washing",
      placeColumn: "Place",
      costColumn: "Cost",
      qtyColumn: "Qty",
      viewReceipt: "View receipt",
      noReceipt: "No receipt yet",
      notDone: "Not completed",
      finalQty: "Final",
      doneAction: "Complete washing",
      shrinkage: "Shrinkage",
      loadError: "Failed to load washing data",
      saveError: "Failed to save washing data",
      completeError: "Failed to complete the washing process"
    },
    regularSales: {
      overline: "Regular Sales",
      title: "Create regular sale",
      helper:
        "Once saved, lot stock is immediately reduced from the warehouse. When the sale is closed, returns go back to the original lot and differences are automatically recorded as shrinkage.",
      code: "Code",
      codeAuto: "Auto-generated on save",
      saleDate: "Sale date",
      buyer: "Buyer",
      chooseBuyer: "Choose buyer",
      buyerCurrency: "Buyer currency",
      chooseBuyerCurrency: "Choose buyer currency",
      companyCurrency: "Company currency",
      chooseCompanyCurrency: "Choose company currency",
      buyerRate: "Buyer-to-company rate",
      shippingCost: "Shipping cost",
      shippingEquivalent: "Equivalent shipping cost",
      shippingReceipt: "Shipping receipt",
      notes: "Notes",
      soldItems: "Items sold",
      soldItemsCopy: "Each row represents one lot shipped to the buyer.",
      addProduct: "Add product",
      sellWeight: "Sale weight",
      currentWeight: "Current weight",
      currentSellWeight: "Weight at sale time",
      outgoingWeight: "Outgoing weight",
      returnWeight: "Returned weight",
      shrinkageWeight: "Shrinkage weight",
      malPrice: "MAL Price",
      sellingPrice: "Selling price",
      plannedSellingPrice: "Planned selling price",
      actualSellingPrice: "Actual selling price",
      agentShare: "Agent share",
      itemNotes: "Item notes",
      totalNominal: "Total nominal",
      totalEquivalent: "Total equivalent nominal",
      totalAgentCommission: "Total agent commission",
      listTitle: "Regular sales list",
      listCopy: "Monitor in-progress transactions and fully closed ones.",
      noData: "No regular sales yet",
      noDataCopy: "Create the first transaction to start recording regular outbound sales.",
      detailLoading: "Loading regular sale detail...",
      detailEmpty: "Select a transaction to view details and complete all sale items.",
      closingTitle: "Closing workspace",
      rate: "Rate",
      buyerCompanyCurrency: "Buyer / company currency",
      viewFile: "View file",
      autoShrinkageHint:
        "If actual sold weight + returned weight is less than planned sold weight, the difference is automatically recorded as shrinkage:",
      closeDate: "Completion date",
      updateReceipt: "Update shipping receipt",
      closeAll: "Close all sales",
      saveLabel: "Save sale"
    },
    jitSales: {
      overline: "Just In Time Sales",
      title: "Create just in time sale",
      helper: "Items are purchased and immediately resold without entering the warehouse and without a return process.",
      code: "Code",
      codeAuto: "Auto-generated on save",
      saleDate: "Sale date",
      buyer: "Buyer",
      chooseBuyer: "Choose buyer",
      buyerCurrency: "Buyer currency",
      companyCurrency: "Company currency",
      courier: "Courier",
      chooseCourier: "Choose courier",
      shippingCost: "Shipping cost",
      buyerRate: "Buyer-to-company rate",
      uploadReceipt: "Upload receipt",
      headerNotes: "Header notes",
      soldItems: "Items sold",
      soldItemsCopy: "Each row represents one grade purchased and directly resold.",
      addProduct: "Add product",
      quantity: "Quantity",
      grade: "Grade",
      chooseGrade: "Choose grade",
      malPrice: "MAL Price",
      sellingPrice: "Selling price",
      agentOptional: "Agent (optional)",
      noAgent: "No agent",
      shareScheme: "Profit share scheme",
      chooseScheme: "Choose scheme",
      plannedNominal: "Planned nominal",
      plannedAgentCommission: "Planned agent commission",
      totalNominal: "Total nominal",
      totalEquivalent: "Total equivalent nominal",
      totalAgentCommission: "Total agent commission",
      saveLabel: "Save JIT sale",
      listTitle: "Just in time sales list",
      listCopy: "Monitor transactions that are still open and those fully closed.",
      noData: "No just in time sales yet",
      noDataCopy: "Create the first transaction to start recording direct buy-sell sales.",
      detailLoading: "Loading just in time sale detail...",
      detailEmpty: "Select a transaction to view details and complete all sale items.",
      closingTitle: "Closing workspace",
      actualNominal: "Actual nominal",
      closeDate: "Close date",
      actualSellingPrice: "Actual selling price",
      uploadCloseReceipt: "Upload / replace receipt on close",
      totalBuyerNominal: "Total buyer nominal",
      totalCompanyNominal: "Total company nominal",
      closeAll: "Close JIT sale"
    },
    purchaseAnalysisModule: {
      listTitle: "Purchase batch list",
      listCopy: "Per-purchase analysis sheets to monitor weight, moisture, costs, and profit or loss.",
      countSuffix: "purchases",
      noData: "No purchases yet",
      noDataCopy:
        "Create a purchase first. After that, purchase and lot data will provide the basis for analysis.",
      loadingDetail: "Loading analysis detail...",
      emptyDetail: "Select a purchase to open the analysis sheet.",
      overline: "Purchase Analysis",
      totalPurchase: "Total purchase",
      itemWeight: "Weight",
      profitLoss: "Profit/Loss",
      operational: "Operational",
      finalAnalysis: "Final analysis",
      draftAnalysis: "Still draft",
      saveLabel: "Save analysis",
      operationalCostTitle: "Operational costs",
      operationalCostCopy:
        "Add sorting, handling, transport, or other costs outside the item capital cost.",
      addCost: "Add cost",
      costType: "Cost type",
      costDescription: "Description",
      amount: "Amount",
      delete: "Delete",
      analysisNotes: "Analysis notes"
    },
    purchaseRealizationModule: {
      listTitle: "Purchase realization list",
      listCopy: "Monitor purchase closing status and final profit or loss.",
      searchLabel: "Search purchases",
      searchPlaceholder: "Purchase no., agent, status",
      allStatuses: "All statuses",
      noResults: "No results",
      noResultsCopy: "Change the keyword or status filter to see other purchase realizations.",
      emptyDetail: "Select a purchase",
      emptyDetailCopy:
        "Select a purchase on the left to view realization status and the event timeline.",
      overline: "Purchase Realization",
      closingStatus: "Closing Status",
      closedOn: "Closed",
      noAgentScheme: "No agent scheme",
      qtyRemaining: "Remaining Qty",
      revenue: "Revenue",
      profitLoss: "Profit/Loss",
      agentProfit: "Agent Profit",
      qtySold: "Sold Qty",
      qtyReturned: "Returned Qty",
      qtyShrinkage: "Shrinkage Qty",
      agentShare: "Agent Share %",
      purchaseInfo: "Purchase Info",
      openingCost: "Opening cost",
      additionalCost: "Additional cost",
      totalRevenue: "Total revenue",
      financialSummary: "Financial Summary",
      eventTimeline: "Event Timeline",
      loadingDetail: "Loading detail...",
      noEvents: "No realization events yet",
      noEventsCopy:
        "Events will appear after the purchase is processed, washed, sold, bought out, or otherwise moved as part of realization.",
      openSource: "Open source document",
      qtyIn: "Qty In",
      qtyOut: "Qty Out",
      shrinkage: "Shrinkage",
      cost: "Cost",
      expense: "Expense",
      profit: "Profit"
    },
    consignments: {
      overline: "Consignment",
      title: "Create consignment transaction",
      helper:
        "Select the salesperson and buyer, then assign the lots carried out by the salesperson. The system will immediately reduce available stock so the item position remains traceable.",
      code: "Code",
      codeAuto: "Auto-generated on save",
      consignmentDate: "Consignment date",
      sales: "Sales",
      chooseSales: "Choose sales",
      buyer: "Buyer",
      chooseBuyer: "Choose buyer",
      soldItems: "Consigned items",
      soldItemsCopy: "Each row represents one lot carried out by the salesperson.",
      addProduct: "Add product",
      consignedWeight: "Consigned weight",
      currentWeight: "Current weight",
      itemNotes: "Item notes",
      saveLabel: "Save consignment",
      listTitle: "Consignment list",
      listCopy: "Monitor transactions that are open, partially closed, or fully completed.",
      noData: "No consignments yet",
      noDataCopy: "Create the first consignment transaction to start recording items carried out by salespeople.",
      detailLoading: "Loading consignment detail...",
      detailEmpty: "Select a transaction to view details and close an item.",
      closingTitle: "Transaction settlement",
      salesBuyer: "Sales / Buyer",
      qty: "Qty",
      currentAvailable: "Current available balance",
      soldWeight: "Sold weight",
      returnedWeight: "Returned weight",
      soldPrice: "Selling price",
      salesCommission: "Sales commission",
      shrinkageAgentCommission: "Shrinkage / agent commission",
      agentCommissionFormula: "Agent commission formula:",
      agentCommissionFormulaValue:
        "((sold weight * (selling price - MAL price)) - sales commission) * agent profit share percentage",
      noAgentShare: "The current value is 0 because this lot has no agent share data.",
      autoShrinkage: "Automatic shrinkage:",
      autoAgentCommission: "Automatic agent commission:",
      noAgentShareShort: "no agent share",
      closeItem: "Close item",
      closeDate: "Close date",
      closedAt: "Closed date"
    },
    receipts: {
      overline: "Warehouse",
      createTitle: "Create Receipt",
      helper:
        "Choose a submitted purchase, verify received quantity, then finalize it to generate lots.",
      choosePurchase: "Choose submitted purchase",
      receiptDate: "Receipt Date",
      receiptLines: "Receipt Lines",
      choosePurchaseToLoad: "Choose a purchase to load line items.",
      qtyReceived: "Qty Received",
      qtyAccepted: "Qty Accepted",
      qtyRejected: "Qty Rejected",
      unitCost: "Unit Cost",
      chooseWarehouse: "Choose warehouse",
      lineNotes: "Line Notes",
      saveDraft: "Save receipt draft",
      listTitle: "Receipt List",
      listCopy: "Draft and finalized receipts.",
      noData: "No receipts yet.",
      generateLots: "Generate lots",
      loadingError: "Failed to load receiving data",
      detailError: "Failed to load receipt detail",
      createError: "Failed to create receipt",
      generateError: "Failed to generate lots",
      finalized: "FINALIZED",
      draft: "DRAFT",
      lots: "Lots",
      purchase: "Purchase",
      receipt: "Receipt"
    },
    lots: {
      overline: "Traceability",
      listTitle: "Inventory Lots",
      listCopy:
        "Lots created from receipts can now be reviewed in detail by supplier, item, location, and aging.",
      searchPlaceholder: "Search lot, supplier, item, warehouse",
      snapshotTitle: "Lot Snapshot",
      snapshotCopy: "Source of truth for active stock by lot.",
      noData: "No lots yet or the search returned no results.",
      loadingError: "Failed to load lots",
      loading: "Loading lot data...",
      code: "Lot Code",
      cost: "Cost",
      aging: "Aging",
      initialQty: "Initial",
      remainingQty: "Remaining",
      days: "days",
      backToLots: "Back to lots",
      notFound: "Lot not found",
      loadDetailError: "Failed to load lot detail",
      identity: "Lot identity",
      receivedAt: "Received At",
      quantityCost: "Quantity & Cost",
      originalQty: "Original Qty",
      availableQty: "Available Qty",
      reservedQty: "Reserved Qty",
      damagedQty: "Damaged Qty",
      shrinkageQty: "Shrinkage Qty",
      storage: "Storage",
      labels: "Labels",
      noLabels: "No labels yet.",
      producedBy: "Produced By Transformation",
      usedIn: "Used In Transformation",
      noProducedBy: "This lot has not been recorded as a mixing/regrade result yet.",
      noUsedIn: "This lot has not been used in another transformation yet.",
      parentLot: "Parent Lot",
      childLots: "Child Lots",
      usedQty: "Used",
      producedQty: "Produced"
    },
    stockAdjustments: {
      overline: "Warehouse control",
      createTitle: "Create Stock Adjustment",
      helper:
        "Use negative qty for shrinkage or damage, and positive qty for stock increase corrections. Every change is recorded against the related lot.",
      chooseActiveLot: "Choose active lot",
      adjustmentReason: "Adjustment Reason",
      chooseReason: "Choose adjustment reason",
      adjustmentDate: "Adjustment Date",
      adjustmentQty: "Adjustment Qty",
      adjustmentQtyPlaceholder: "-0.500 or 0.500",
      save: "Save adjustment",
      historyTitle: "Stock Adjustment History",
      historyCopy: "Trace shrinkage, damage, and quantity corrections by lot.",
      noData: "No stock adjustments yet.",
      before: "Before",
      after: "After",
      reason: "Reason",
      category: "Category",
      available: "Available",
      createError: "Failed to create adjustment",
      loadingError: "Failed to load stock adjustment data"
    },
    resetPassword: {
      title: "Reset Password",
      description: "Enter your new password to continue logging in to AbelBirdnest Stock.",
      tokenMissing: "Password reset token was not found.",
      newPassword: "New Password",
      confirmPassword: "Confirm New Password",
      saveNewPassword: "Save new password",
      success: "Password has been reset successfully.",
      failure: "Failed to reset password"
    },
    changePassword: {
      description: "Use your current password to securely change your account password.",
      currentPassword: "Current Password",
      newPassword: "New Password",
      confirmPassword: "Confirm New Password",
      submit: "Save new password",
      success: "Password updated successfully.",
      failure: "Failed to change password",
      securityTitle: "Security practices",
      securityTips: [
        "Use at least 8 characters and avoid reusing old passwords.",
        "Do not share your password with other users, even within the same team.",
        "After changing it, store the password in your internal password manager if available."
      ]
    },
    verifyEmail: {
      title: "Verify Email",
      verifying: "Verifying email...",
      tokenMissing: "Verification token was not found.",
      success: "Email has been verified successfully.",
      failure: "Failed to verify email"
    },
    dashboard: {
      purchaseVsSales: "Purchase vs Sales Trend",
      purchaseVsSalesCopy: "Comparison of purchased quantity and sold quantity over the last 6 months.",
      purchaseVsReceipt: "Purchase vs Sales Trend",
      purchaseVsReceiptCopy: "Comparison of purchased quantity and sold quantity over the last 6 months.",
      lastSixMonths: "Last 6 months",
      purchases: "Purchases",
      receipts: "Receipts",
      sales: "Sales",
      topPartners: "Top Partners",
      topPartnersCopy: "Suppliers currently holding the largest active stock.",
      averageMargin: "Average Margin",
      averageMarginCopy:
        "Processing efficiency is improving alongside better moisture control and receipt quality.",
      receiptAcceptance: "Sales absorption",
      lotAgeDistribution: "Lot Age Distribution",
      recentActivity: "Recent Activity",
      quickActions: "Quick Actions",
      quickActionsCopy: "Shortcuts to the most frequently used transaction flows.",
      criticalLots: "Lots Needing Attention",
      criticalLotsCopy: "Lots that require follow-up due to low stock, aging, or hold status.",
      lotCode: "Lot code",
      supplier: "Supplier",
      item: "Item",
      availableQty: "Available qty",
      reason: "Reason",
      status: "Status",
      lowStock: "Low Stock",
      aging: "Aging",
      onHold: "On Hold"
    },
    placeholder: {
      mode: "Mode",
      draftMode: "Operational draft",
      backend: "Backend",
      backendReady: "Ready to connect",
      uiTarget: "UI Target",
      followsStitch: "Following Stitch pack",
      initialScope: "Initial scope",
      upcomingFlow: "Upcoming flow",
      upcomingFlowCopy: "This temporary screen follows the final screen structure.",
      inputMain: "Primary input",
      validation: "Validation",
      transactionOutput: "Transaction output",
      placeholderBody:
        "This area will be filled with forms, tables, and actions after the next core modules are built.",
      implementationNotes: "Implementation notes"
    },
    master: {
      overline: "Master data",
      code: "Code",
      name: "Name",
      description: "Description",
      address: "Address",
      status: "Status",
      active: "ACTIVE",
      inactive: "INACTIVE",
      add: "Add",
      update: "Update",
      list: "List",
      dataCount: "records",
      noData: "No data yet. Add the first record from the form on the left.",
      rankOrder: "Rank Order",
      saveError: "Failed to save data",
      loadError: "Failed to load data",
      deleteError: "Failed to delete data",
      confirmDeletePrefix: "Delete"
    },
    users: {
      overline: "Admin access",
      createTitle: "Create New User",
      createCopy:
        "A new user will receive a verification email. Until it is verified, the user cannot sign in.",
      editTitle: "Edit User",
      editCopy:
        "Super admins and admins can update user data. If the email changes, the system will resend the verification email.",
      name: "Name",
      email: "Email",
      username: "Username",
      phone: "Phone",
      initialPassword: "Initial Password",
      role: "Role",
      status: "Status",
      create: "Create user",
      listTitle: "Application Users",
      listCopy: "Manage users, email verification, and forced password resets.",
      verified: "Verified",
      pending: "Pending",
      sendVerification: "Send verification",
      forceReset: "Force reset",
      delete: "Delete",
      createdMessage: "User created and verification email sent.",
      updatedMessage: "User updated successfully."
    },
    audit: {
      search: "Search",
      action: "Action",
      user: "User",
      fromDate: "From date",
      toDate: "To date",
      allActions: "All actions",
      allUsers: "All users",
      logTitle: "Activity Log",
      logCopy:
        "Displays login events, user administration, and transaction changes recorded by the system.",
      record: "records",
      time: "Time",
      entity: "Entity",
      changes: "Changes",
      path: "Path",
      summary: "Summary",
      noData: "No audit trail found for this filter.",
      pageOf: "Page",
      of: "of",
      prev: "Prev",
      next: "Next",
      before: "Before",
      after: "After"
    },
    help: {
      title: "Help Center",
      description:
        "Use this page to understand account access, email verification, and password recovery steps.",
      cards: [
        {
          title: "Email verification",
          copy: "New users must click the verification link from email before they can sign in."
        },
        {
          title: "Forgot password",
          copy: "Use the forgot password action on the login page to receive a reset link at the registered email."
        },
        {
          title: "Access denied",
          copy: "If a menu cannot be opened, check your account role or contact the application admin."
        },
        {
          title: "Audit & security",
          copy: "Important actions such as login, password reset, and transaction changes are recorded in the audit trail."
        }
      ],
      contactTitle: "Support contact",
      contactCopy: "If you have an operational or account access issue, send the problem details to the following contact.",
      contactLabel: "Support email",
      securityNote:
        "Do not send active passwords over email. For account recovery, use the password reset flow or ask an admin to force reset the account."
    },
    settings: {
      company: "Company profile",
      companyCopy: "Business name, brand identity, address, logo, and operational timezone.",
      email: "Email & notifications",
      emailCopy: "SMTP, user email verification, password reset, and operational alerts.",
      numbering: "Numbering & auto codes",
      numberingCopy: "Purchase, receipt, lot, adjustment, and transformation numbering formats.",
      security: "Security & sessions",
      securityCopy: "Password rules, session timeout, role access, and audit retention.",
      preferences: "Language & preferences",
      preferencesCopy: "Default language, date format, currency, and base UI behavior.",
      integration: "Integrations",
      integrationCopy: "Export/import, webhooks, and external connections when needed later.",
      runtimeTitle: "Application runtime configuration",
      runtimeCopy:
        "Changes to SMTP, default language, session timeout, and transaction prefixes will be used by new processes after saving.",
      loading: "Loading settings...",
      loadError: "Failed to load settings",
      saveAll: "Save settings",
      saveSuccess: "Settings saved successfully.",
      saveError: "Failed to save settings",
      companyName: "Company name",
      companyEmail: "Company email",
      companyPhone: "Company phone",
      companyBankName: "Company bank name",
      companyBankAccountNumber: "Company bank account number",
      companyBankAccounts: "Company bank accounts",
      addCompanyBankAccount: "Add account",
      companyAddress: "Company address",
      companyTimezone: "Operational timezone",
      smtpHost: "SMTP host",
      smtpPort: "SMTP port",
      smtpUser: "SMTP username",
      smtpPassword: "SMTP password",
      smtpPasswordPlaceholder: "Leave blank to keep the current SMTP password",
      smtpFromName: "Email sender name",
      smtpFromEmail: "Email sender address",
      smtpSecure: "Use secure connection (SSL/TLS)",
      purchasePrefix: "Purchase prefix",
      receiptPrefix: "Receipt prefix",
      lotPrefix: "Lot prefix",
      adjustmentPrefix: "Stock adjustment prefix",
      transformationPrefix: "Transformation prefix",
      fundRequestPrefix: "Fund request prefix",
      washingPrefix: "Washing prefix",
      regularSalePrefix: "Regular sale prefix",
      jitSalePrefix: "JIT sale prefix",
      consignmentPrefix: "Consignment prefix",
      defaultLanguage: "Default language",
      currencyCode: "Currency code",
      dateFormat: "Date format",
      passwordMinLength: "Minimum password length",
      sessionTimeoutMinutes: "Session timeout (minutes)",
      requireEmailVerification: "Require email verification before users can sign in",
      auditRetentionDays: "Audit trail retention (days)",
      currentScope: "Current implementation priority",
      currentScopeCopy:
        "This area becomes the foundation so system configuration does not mix with operational master data.",
      nextPhase: "Next phase",
      nextItems: [
        "Company profile and logo form.",
        "SMTP configuration and test email.",
        "Transaction numbering and lot prefix format.",
        "Default language and system preferences.",
        "Password policy and session timeout."
      ]
    }
  }
} as const;

export function getDictionary(locale: AppLocale) {
  return dictionaries[locale];
}
