{
  "version": "1.0",
  "name": "Single-choice list",
  "template": "{\"type\":\"Card\",\"size\":\"sm\",\"asForm\":true,\"confirm\":{\"label\":\"Submit\",\"action\":{\"type\":\"submit\",\"requestAssistantResponse\":true}},\"children\":[{\"type\":\"Col\",\"gap\":2,\"children\":[{\"type\":\"Title\",\"value\":{{ (title) | tojson }},\"size\":\"sm\"},{\"type\":\"RadioGroup\",\"name\":\"choice\",\"options\":{{ (options) | tojson }},\"direction\":\"col\",\"defaultValue\":{{ (defaultValue) | tojson }},\"required\":true}]}]}",
  "jsonSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "title": {
        "type": "string"
      },
      "options": {
        "minItems": 1,
        "maxItems": 30,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "value": {
              "type": "string"
            },
            "disabled": {
              "type": "boolean"
            }
          },
          "required": [
            "label",
            "value"
          ],
          "additionalProperties": false
        }
      },
      "defaultValue": {
        "type": "string"
      },
      "actionType": {
        "type": "string"
      }
    },
    "required": [
      "title",
      "options"
    ],
    "additionalProperties": false
  },
  "outputJsonPreview": {
    "type": "Card",
    "size": "sm",
    "asForm": true,
    "confirm": {
      "label": "Submit",
      "action": {
        "type": "submit",
        "requestAssistantResponse": true
      }
    },
    "children": [
      {
        "type": "Col",
        "gap": 2,
        "children": [
          {
            "type": "Title",
            "value": "Select one option",
            "size": "sm"
          },
          {
            "type": "RadioGroup",
            "name": "choice",
            "options": [
              {
                "label": "Option A",
                "value": "A"
              },
              {
                "label": "Option B",
                "value": "B"
              },
              {
                "label": "Option C",
                "value": "C"
              },
              {
                "label": "Option D",
                "value": "D",
                "disabled": true
              }
            ],
            "direction": "col",
            "defaultValue": "A",
            "required": true
          }
        ]
      }
    ]
  },
  "encodedWidget": "eyJpZCI6IjFjYmYyMWEyLTcxZTktNDc5My1iYTE5LTVlYTk4NzQzNmUwZiIsIm5hbWUiOiJTaW5nbGUtY2hvaWNlIGxp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