// koseki-web — 画面固有設定（app-core.js が window.SYSTEM_CONFIG を読む）
window.SYSTEM_CONFIG = {
  domains: [
  {
    id: "family-registers",
    label: "戸籍登録",
    endpoint: "/api/family-registers",
    cols: [
      { key: "kosekiCode", label: "戸籍コード" },
      { key: "householdHead", label: "筆頭者" },
      { key: "address", label: "住所" },
      { key: "status", label: "状態", badge: true },
      { key: "createdAt", label: "登録日時" },
    ],
    createFields: [
      { name: "householdHead", label: "筆頭者氏名", required: true, placeholder: "山田 太郎" },
      { name: "address", label: "住所", required: true, placeholder: "東京都千代田区..." },
      { name: "registrationDate", label: "届出日", type: "date" },
      { name: "notes", label: "備考", type: "textarea" },
    ],
  },
  {
    id: "koseki-events",
    label: "届出管理",
    endpoint: "/api/koseki-events",
    cols: [
      { key: "eventType", label: "届出種別", badge: true },
      { key: "registerId", label: "戸籍ID" },
      { key: "effectiveDate", label: "届出日" },
      { key: "reportedBy", label: "届出人" },
      { key: "status", label: "状態", badge: true },
    ],
    createFields: [
      { name: "registerId", label: "戸籍ID (family-registers)", required: true, placeholder: "登録済み戸籍のIDを入力" },
      { name: "eventType", label: "届出種別", required: true, type: "select", options: ["birth", "death", "marriage", "divorce", "adoption", "address_change", "name_change", "transfer"] },
      { name: "effectiveDate", label: "届出日", required: true, type: "date" },
      { name: "reportedBy", label: "届出人氏名", placeholder: "山田 花子" },
      { name: "notes", label: "備考", type: "textarea" },
    ],
  },
],
  calc: { title: "戸籍 証明手数料の試算", endpoint: "/api/koseki/fee", primary: { key: "total", label: "手数料合計", format: "yen" }, fields: [ { key: "certType", label: "証明種別", type: "select", options: ["戸籍全部事項証明書","戸籍個人事項証明書","除籍全部事項証明書","改製原戸籍","戸籍記載事項証明書","身分証明書"] }, { key: "copies", label: "通数", type: "number", default: 1 }, { key: "postal", label: "郵送", type: "select", options: [ { value: false, label: "なし" }, { value: true, label: "あり" } ] } ] },
};
