{
  "children": [
    {
      "children": [
        {
          "key": "activity_type",
          "id": "activity_type",
          "name": "activity_type",
          "label": "$pgettext('activity_type', 'Meeting or Training')",
          "validation": "required",
          "placeholder": "$gettext(\"Please select\")",
          "$formkit": "select",
          "options": "$ida(programactivitytype)"
        },
        {
          "key": "activity_subtype",
          "if": "$get(activity_type).value",
          "id": "activity_subtype",
          "name": "activity_subtype",
          "label": "$pgettext('activity_type', 'Activity Type')",
          "validation": "required",
          "placeholder": "$gettext(\"Please select\")",
          "$formkit": "select",
          "options": "$ida(programactivity, \"type_id=\"+$get(activity_type).value))"
        },
        {
          "key": "date",
          "id": "date",
          "name": "date",
          "label": "$gettext(\"Date\")",
          "validation": "dateInPast",
          "$formkit": "datepicker",
          "calendarIcon": "calendar",
          "format": "DD/MM/YYYY",
          "nextIcon": "angleRight",
          "prevIcon": "angleLeft",
          "_currentDate": "$getCurrentDate",
          "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"
                          }
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          },
          "valueFormat": "YYYY-MM-DD"
        }
      ],
      "id": "meetingInformation",
      "$formkit": "group",
      "icon": "las la-info-circle",
      "title": "Meeting Information"
    },
    {
      "children": [
        {
          "key": "district",
          "id": "district",
          "name": "district",
          "label": "$gettext(Municipality)",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations()"
        },
        {
          "key": "administrative_post",
          "if": "$get(district).value && $get(activity_subtype).value !== '20'",
          "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 && $get(activity_subtype).value !== '20' && $get(activity_subtype).value !== '21'",
          "id": "suco",
          "name": "suco",
          "label": "$gettext(Suco)",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations($get(district).value, $get(administrative_post).value)"
        },
        {
          "key": "aldeia",
          "if": "$get(suco).value && $get(activity_type).value !== '1' && $get(activity_subtype).value !== '20' && $get(activity_subtype).value !== '21' && $get(activity_subtype).value !== '1' && $get(activity_subtype).value !== '24' && $get(activity_subtype).value !== '4' && $get(activity_subtype).value !== '11' && $get(activity_subtype).value !== '16' && $get(activity_subtype).value !== '17' && $get(activity_subtype).value !== '28'",
          "id": "aldeia",
          "name": "aldeia",
          "label": "$gettext(Aldeia)",
          "validation": "required",
          "$formkit": "select",
          "options": "$getLocations($get(district).value, $get(administrative_post).value, $get(suco).value)"
        }
      ],
      "id": "location",
      "$formkit": "group",
      "icon": "las la-map-marked-alt",
      "title": "Location"
    },
    {
      "children": [
        {
          "key": "attendance_male",
          "id": "attendance_male",
          "name": "attendance_male",
          "label": "$pgettext('partisipants', 'Total participants male')",
          "validation": "greaterThanOrEqualSum:kpa_male+disable_male+community_member_male|required",
          "$formkit": "number",
          "validation-messages": {
            "required": "$gettext(\"The total participants male is required\")",
            "greaterThanOrEqualSum": "$gettext(\"The total participants male should be greater than or equal to the sum of Participants Suku Management Team (SMT) - male, Number of People with Disability - male and Number of community members - male\")"
          }
        },
        {
          "key": "attendance_female",
          "id": "attendance_female",
          "name": "attendance_female",
          "label": "$pgettext('partisipants', 'Total participants female')",
          "validation": "required|greaterThanOrEqualSum:kpa_female+community_member_female+disable_female",
          "$formkit": "number",
          "validation-messages": {
            "required": "$gettext(\"The total participants female is required\")",
            "greaterThanOrEqualSum": "$gettext(\"The total participants female should be greater than or equal to the sum of Participants Suku Management Team (SMT) - female, Number of People with Disability - female and Number of community members - female\")"
          }
        },
        {
          "key": "kpa_male",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 20 && $get(activity_subtype).value != 21 && $get(activity_subtype).value != 40 && $get(activity_subtype).value != 11",
          "id": "kpa_male",
          "name": "kpa_male",
          "label": "$pgettext('partisipants', 'Number of Suku Structure PNDS - male')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        },
        {
          "key": "kpa_female",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 11 && $get(activity_subtype).value != 20 && $get(activity_subtype).value != 21",
          "id": "kpa_female",
          "name": "kpa_female",
          "label": "$pgettext('partisipants', 'Number of Suku Structure PNDS - female')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        },
        {
          "key": "disable_male",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 40 && $get(activity_subtype).value != 11",
          "id": "disable_male",
          "name": "disable_male",
          "label": "$pgettext('partisipants', 'Number of People with Disability - male')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        },
        {
          "key": "disable_female",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 11",
          "id": "disable_female",
          "name": "disable_female",
          "label": "$pgettext('partisipants', 'Number of People with Disability - female')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        },
        {
          "key": "community_member_male",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 20 && $get(activity_subtype).value != 21 && $get(activity_subtype).value != 40 && $get(activity_subtype).value != 11",
          "id": "community_member_male",
          "name": "community_member_male",
          "label": "$pgettext('partisipants', 'Number of community members - male')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        },
        {
          "key": "community_member_female",
          "if": "$get(activity_type).value !== '----' && $get(activity_subtype).value !== '----' && $get(activity_subtype).value != 16 && $get(activity_subtype).value != 11 && $get(activity_subtype).value != 20 && $get(activity_subtype).value != 21",
          "id": "community_member_female",
          "name": "community_member_female",
          "label": "$pgettext('partisipants', 'Number of community members - female')",
          "validation": "required",
          "$formkit": "number",
          "min": 0
        }
      ],
      "id": "participants",
      "$formkit": "group",
      "icon": "las la-users",
      "title": "Participants"
    }
  ],
  "name": "SF_1_1",
  "$formkit": "group"
}