{
  "children": [
    {
      "children": [
        {
          "key": "district",
          "id": "district",
          "name": "district",
          "label": "$gettext(Municipality)",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations()"
        },
        {
          "key": "administrative_post",
          "if": "$get(district).value",
          "id": "administrative_post",
          "name": "administrative_post",
          "label": "$gettext(\"Administrative Post\")",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations($get(district).value)"
        },
        {
          "key": "suco",
          "if": "$get(administrative_post).value",
          "id": "suco",
          "name": "suco",
          "label": "$gettext(Suco)",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations($get(district).value, $get(administrative_post).value)"
        },
        {
          "key": "date",
          "id": "date",
          "name": "date",
          "label": "$gettext(\"Date\")",
          "validation": "dateInPast",
          "$formkit": "datepicker",
          "calendarIcon": "calendar",
          "format": "DD/MM/YY",
          "nextIcon": "angleRight",
          "prevIcon": "angleLeft",
          "valueFormat": "YYYY-MM-DD",
          "_currentDate": "$getCurrentDate",
          "value-format": "YYYY-MM-DD",
          "sectionsSchema": {
            "day": {
              "children": [
                "$day.getDate()",
                {
                  "if": "$attrs._currentDate().day === $day.getDate()",
                  "children": [
                    {
                      "if": "$attrs._currentDate().month === $day.getMonth()",
                      "children": [
                        {
                          "if": "$attrs._currentDate().year === $day.getFullYear()",
                          "$el": "div",
                          "attrs": {
                            "class": "formkit-day-highlight"
                          }
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          }
        },
        {
          "name": "year",
          "label": "$gettext(\"Fiscal Year\")",
          "validation": "required",
          "placeholder": "$gettext(\"Select year\")",
          "$formkit": "select",
          "options": "$ida(year)"
        }
      ],
      "id": "meetinginformation",
      "$formkit": "group",
      "icon": "las la-map-marked-alt",
      "title": "Location"
    },
    {
      "children": [
        {
          "id": "total_amount",
          "name": "total_amount",
          "label": "$gettext(\"Total amount (USD)\")",
          "validation": "required",
          "$formkit": "currency",
          "min": 0,
          "step": "0.01",
          "onChange": "$formula.cfm2ff4"
        },
        {
          "id": "community_meetings",
          "name": "community_meetings",
          "label": "$gettext(\"2000 - Community meetings (USD) - 10%\")",
          "validation": "required",
          "$formkit": "currency",
          "min": 0,
          "step": "0.01",
          "onChange": "$formula.cfm2ff4"
        },
        {
          "id": "community_training",
          "name": "community_training",
          "label": "$gettext(\"2001 - ES-PNDS training (USD) - 10%\")",
          "validation": "required",
          "$formkit": "currency",
          "min": 0,
          "step": "0.01",
          "onChange": "$formula.cfm2ff4"
        },
        {
          "id": "labour_incentive",
          "name": "labour_incentive",
          "label": "$gettext(\"2002 - Project Administration Costs (USD) - 20%\")",
          "validation": "required",
          "$formkit": "currency",
          "min": 0,
          "step": "0.01",
          "onChange": "$formula.cfm2ff4"
        },
        {
          "id": "project_admin_cost",
          "name": "project_admin_cost",
          "label": "$gettext(\"2003 - Incentives for ES-PNDS (USD) - 60%\")",
          "validation": "required",
          "$formkit": "currency",
          "min": 0,
          "step": "0.01",
          "onChange": "$formula.cfm2ff4"
        }
      ],
      "id": "operationalfundbudgetdetails",
      "$formkit": "group",
      "icon": "las la-money-bill",
      "title": "Operational fund budget"
    },
    {
      "children": [
        {
          "children": [
            {
              "name": "uuid",
              "$formkit": "uuid",
              "readonly": true
            },
            {
              "children": [
                "Output ",
                {
                  "children": [
                    "$: ($index + 1)"
                  ],
                  "classes": "mx-1",
                  "$el": "span"
                }
              ],
              "$el": "div",
              "attrs": {
                "class": "rounded-full px-5 py-2 bg-zinc-400 text-lg font-bold mb-5"
              }
            },
            {
              "key": "activity",
              "id": "activity",
              "name": "activity",
              "label": "$gettext(\"Activity name\")",
              "placeholder": "$gettext(\"Please select\")",
              "$formkit": "select",
              "options": "$ida(cycle, 'current')"
            },
            {
              "key": "$: (project + $index)",
              "if": "$ida(project, \"suku_id=\"+ $get(\"suco\").value).length>0",
              "id": "$: (project + $index)",
              "name": "project",
              "label": "$gettext(\"Project name\")",
              "placeholder": "$gettext(\"Search project\")",
              "$formkit": "autocomplete",
              "options": "$ida(project, \"suku_id=\"+ $get(\"suco\").value)",
              "inputClass": "!pl-10",
              "prefixIcon": "search"
            },
            {
              "id": "materials",
              "name": "materials",
              "label": "$gettext(\"3000 - Materials (USD)\")",
              "$formkit": "currency",
              "min": "0",
              "step": "0.01"
            },
            {
              "id": "labour_incentive_3001",
              "name": "labour_incentive_3001",
              "label": "$gettext(\"3001 - Labour incentive (USD)\")",
              "$formkit": "currency",
              "min": "0",
              "step": "0.01"
            }
          ],
          "id": "repeaterInfrastructureFund",
          "name": "repeaterInfrastructureFund",
          "$formkit": "repeater",
          "upControl": false,
          "downControl": false,
          "addLabel": "$gettext(\"Add project\")",
          "itemsClass": "repeater",
          "removeLabel": "$gettext(\"Remove\")",
          "removeAction": "$repeaterRemoveAction",
          "sectionsSchema": {
            "remove": {
              "children": [
                {
                  "if": "$value.length > 1",
                  "$el": "button",
                  "attrs": {
                    "class": "disabled:hidden cursor-pointer flex items-center justify-center flex-row-reverse h-[50px] rounded-2.5xl px-4 w-full bg-white border-2 border-solid border-emerald-600 text-zinc-900 hover:bg-emerald-600 hover:text-white font-bold text-base",
                    "onClick": "$attrs.removeAction",
                    "data-index": "$index",
                    "data-repeaterid": "$id"
                  },
                  "children": [
                    "$attrs.removeLabel"
                  ]
                }
              ]
            }
          }
        }
      ],
      "id": "infrastructureExpenditures",
      "$formkit": "group",
      "icon": "las la-users-cog",
      "title": "Infrastructure fund budget"
    }
  ],
  "name": "CFM_2_FF_4",
  "$formkit": "group"
}