{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto Funds Transfer Claim",
    "description": "Record a transfer of funds or tokens from one address to another. A red star * means you must answer.",
    "pages": [
      {
        "name": "source",
        "title": "Where are the funds coming from?",
        "elements": [
          {
            "type": "text",
            "name": "ecs:sourceAddress",
            "title": "Source address",
            "description": "The address the funds are being transferred from.",
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:sourceIdentifierType",
            "title": "Source identifier type",
            "description": "Optional. If you also know who this address belongs to, pick the kind of ID you have.",
            "choices": [
              {
                "value": "customerId",
                "text": "Customer ID (e.g. C21009802)"
              },
              {
                "value": "agentId",
                "text": "Agent ID (e.g. A21009802)"
              },
              {
                "value": "operatorId",
                "text": "Operator ID (e.g. O21009802)"
              },
              {
                "value": "householdId",
                "text": "Household ID (e.g. H12345678)"
              }
            ],
            "showOtherItem": true
          },
          {
            "type": "text",
            "name": "ecs:sourceIdentifier",
            "title": "Source identifier",
            "description": "The ID itself.",
            "visibleIf": "{ecs:sourceIdentifierType} notempty"
          }
        ]
      },
      {
        "name": "destination",
        "title": "Where are the funds going?",
        "elements": [
          {
            "type": "text",
            "name": "ecs:destinationAddress",
            "title": "Destination address",
            "description": "The address the funds are being transferred to.",
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:destinationIdentifierType",
            "title": "Destination identifier type",
            "description": "Optional. If you also know who this address belongs to, pick the kind of ID you have.",
            "choices": [
              {
                "value": "customerId",
                "text": "Customer ID (e.g. C21009802)"
              },
              {
                "value": "agentId",
                "text": "Agent ID (e.g. A21009802)"
              },
              {
                "value": "operatorId",
                "text": "Operator ID (e.g. O21009802)"
              },
              {
                "value": "householdId",
                "text": "Household ID (e.g. H12345678)"
              }
            ],
            "showOtherItem": true
          },
          {
            "type": "text",
            "name": "ecs:destinationIdentifier",
            "title": "Destination identifier",
            "description": "The ID itself.",
            "visibleIf": "{ecs:destinationIdentifierType} notempty"
          }
        ]
      },
      {
        "name": "transfer",
        "title": "Transfer details",
        "elements": [
          {
            "type": "text",
            "name": "ecs:transferAmount",
            "title": "Amount",
            "description": "How much is being transferred.",
            "inputType": "number",
            "min": 0,
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:transferDenom",
            "title": "Token or denomination",
            "description": "Which token is being transferred.",
            "choices": [
              "SUPA-ZMW",
              "SUPA - Commission",
              "SUPA - Reward",
              "SUPA - Pellet",
              "SUPA - MoMo",
              "Bean"
            ],
            "showOtherItem": true,
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:transferReason",
            "title": "Reason for transfer",
            "description": "Why these funds are being moved.",
            "choices": [
              "Correction",
              "Withdrawal",
              "Refund",
              "Reallocation"
            ],
            "showOtherItem": true,
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:transferTxHash",
            "title": "Transaction hash",
            "description": "Optional. If the transfer has already been made on chain, the hash that recorded it."
          },
          {
            "type": "text",
            "name": "schema:startDate",
            "title": "Requested effective date of transfer",
            "description": "Optional. The transfer takes effect on this date only if the claim has been approved by then. If approval comes later, it takes effect on the date it is approved.",
            "inputType": "date"
          },
          {
            "type": "file",
            "name": "ecs:transferEvidence",
            "title": "Upload supporting evidence",
            "description": "Optional. Statements, correspondence or other supporting documents.",
            "allowMultiple": true,
            "acceptedTypes": "image/jpeg, image/png, application/pdf",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          },
          {
            "type": "text",
            "name": "ecs:additionalConfirmingPerson",
            "title": "Additional confirming person",
            "description": "Optional. A second person who can confirm this request - someone SupaMoto HQ can contact when reviewing it, alongside whoever submitted it. This does not authorise the transfer on its own: the claim must still be approved by SupaMoto HQ."
          }
        ]
      },
      {
        "name": "reviewAndSubmit",
        "title": "Review",
        "elements": [
          {
            "type": "html",
            "name": "reviewMessage",
            "html": "<h3>Almost done!</h3><p>Please review your answers before submitting. Check the source and destination addresses carefully - a transfer cannot be undone once it has been made.</p>"
          }
        ]
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}
