{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "SupaMoto Funds Minting Claim",
    "description": "Request the minting of new funds or tokens to an address, and record the reason and evidence for it. A red star * means you must answer.",
    "pages": [
      {
        "name": "destination",
        "title": "Who is receiving the funds?",
        "elements": [
          {
            "type": "text",
            "name": "ecs:destinationAddress",
            "title": "Destination address",
            "description": "The address the newly minted funds will be credited 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": "mint",
        "title": "Minting details",
        "elements": [
          {
            "type": "text",
            "name": "ecs:mintAmount",
            "title": "Amount",
            "description": "How much is being minted.",
            "inputType": "number",
            "min": 0,
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:mintDenom",
            "title": "Token or denomination",
            "description": "Which token is being minted.",
            "choices": [
              "SUPA-ZMW",
              "SUPA - Commission",
              "SUPA - Reward",
              "SUPA - Pellet",
              "SUPA - MoMo",
              "Bean"
            ],
            "showOtherItem": true,
            "isRequired": true
          },
          {
            "type": "dropdown",
            "name": "ecs:mintReason",
            "title": "Reason for minting",
            "description": "Why new funds are being created. Choose the closest reason, or pick Other and describe it.",
            "choices": [
              "Migration from legacy system",
              "Promotion",
              "Campaign",
              "Incentive or reward",
              "Compensation",
              "Correction"
            ],
            "showOtherItem": true,
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:legacySystemName",
            "title": "Legacy system",
            "description": "The system this balance is being carried over from, for example the previous SupaMoto wallet or the accounting system it was held in.",
            "visibleIf": "{ecs:mintReason} = 'Migration from legacy system'",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:legacyRecordReference",
            "title": "Legacy record reference",
            "description": "The account, wallet or ledger reference in that system which holds the balance being migrated.",
            "visibleIf": "{ecs:mintReason} = 'Migration from legacy system'",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:legacyBalanceAsAt",
            "title": "Legacy balance read on",
            "description": "Optional. The date the legacy balance was read. Anything added in the legacy system after this date is not covered by this claim.",
            "inputType": "date",
            "visibleIf": "{ecs:mintReason} = 'Migration from legacy system'"
          },
          {
            "type": "text",
            "name": "ecs:campaignName",
            "title": "Promotion or campaign name",
            "description": "The name this promotion, campaign or incentive is run under, so that everything minted for it can be found together.",
            "visibleIf": "{ecs:mintReason} = 'Promotion' or {ecs:mintReason} = 'Campaign' or {ecs:mintReason} = 'Incentive or reward'",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "ecs:campaignReference",
            "title": "Promotion or campaign reference",
            "description": "Optional. An approval, budget or reference number for the promotion, if there is one.",
            "visibleIf": "{ecs:mintReason} = 'Promotion' or {ecs:mintReason} = 'Campaign' or {ecs:mintReason} = 'Incentive or reward'"
          }
        ]
      },
      {
        "name": "supporting",
        "title": "Supporting information",
        "elements": [
          {
            "type": "comment",
            "name": "ecs:mintJustification",
            "title": "Explain why these funds should be minted",
            "description": "Set out the reasoning in your own words. Whoever reviews this claim will rely on what you write here.",
            "isRequired": true
          },
          {
            "type": "file",
            "name": "ecs:mintEvidence",
            "title": "Upload supporting evidence",
            "description": "Optional. Legacy system statements, promotion or campaign approvals, correspondence or other documents that back up this request.",
            "allowMultiple": true,
            "acceptedTypes": "image/jpeg, image/png, application/pdf",
            "waitForUpload": true,
            "maxSize": 10000000,
            "sourceType": "file-camera"
          }
        ]
      },
      {
        "name": "reviewAndSubmit",
        "title": "Review",
        "elements": [
          {
            "type": "html",
            "name": "reviewMessage",
            "html": "<h3>Almost done!</h3><p>Please review your answers before submitting. Check the destination address, the amount and the token carefully - minting creates new funds, and the only way to reverse it is to burn them again.</p>"
          }
        ]
      }
    ],
    "checkErrorsMode": "onValueChanged",
    "validateVisitedEmptyFields": true,
    "textUpdateMode": "onTyping",
    "showPreviewBeforeComplete": true
  }
}
