// ChildAllowanceSystem — 画面固有設定（app-core.js が window.SYSTEM_CONFIG を読む）
window.SYSTEM_CONFIG = {
  domains: [
  { id: "recipients", label: "受給者", endpoint: "/api/recipients",
    cols: [{ key: "recipientNumber", label: "受給者番号" }, { key: "fullName", label: "氏名" }, { key: "address", label: "住所" }, { key: "certificationStatus", label: "認定状態", badge: true }, { key: "status", label: "状態", badge: true }],
    createFields: [{ name: "fullName", label: "氏名", required: true, placeholder: "山田 花子" }, { name: "address", label: "住所", placeholder: "東京都..." }, { name: "certificationDate", label: "認定日", type: "date" }] },
  { id: "applications", label: "申請", endpoint: "/api/applications",
    cols: [{ key: "recipientId", label: "受給者ID" }, { key: "applicationType", label: "申請種別", badge: true }, { key: "status", label: "状態", badge: true }, { key: "createdAt", label: "申請日時" }],
    createFields: [{ name: "recipientId", label: "受給者ID", required: true, placeholder: "登録済み受給者のIDを入力" }, { name: "applicationType", label: "申請種別", required: true, type: "select", options: ["new_certification", "renewal", "amount_change", "child_addition", "status_change", "termination"] }] },
],
  calc: { title: "児童手当 支給額の試算", endpoint: "/api/allowance/calc", primary: { key: "totalMonthly", label: "支給月額", format: "yen" }, fields: [ { key: "birthDates", label: "対象児童の生年月日（カンマ/改行区切り）", type: "multiline", placeholder: "2018-01-01, 2021-01-01, 2024-01-01" }, { key: "asOf", label: "基準日（任意）", type: "date" } ] },
  // 中間サーバ照会（別表: 児童手当認定事務）。支給額算定は児童の生年月日ベースのため取得値は参考表示（所得確認用）
  linkage: {
    agency: "jido", procedure: "児童手当認定事務",
    queries: [ { holder: "tax", item: "所得金額" } ],
  },
};
