{
  "$schema" : "https://json-schema.org/draft/2019-09/schema",
  "$defs" : {
    "Button" : {
      "type" : "object",
      "properties" : {
        "action" : {
          "type" : "string"
        },
        "icon" : {
          "type" : "string"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        },
        "variant" : {
          "$ref" : "#/$defs/ButtonVariant"
        }
      },
      "additionalProperties" : false
    },
    "ButtonVariant" : {
      "type" : "string",
      "enum" : [ "PRIMARY", "SECONDARY", "DANGER" ]
    },
    "Checkbox" : {
      "type" : "object",
      "properties" : {
        "label" : {
          "type" : "string"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "selected" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "Component" : {
      "type" : "object",
      "properties" : {
        "id" : {
          "type" : "string"
        },
        "type" : {
          "type" : "string",
          "enum" : [ "Button", "Checkbox", "Input", "Layout", "Link", "Text" ]
        },
        "config" : {
          "anyOf" : [ {
            "$ref" : "#/$defs/Button"
          }, {
            "$ref" : "#/$defs/Checkbox"
          }, {
            "$ref" : "#/$defs/Input"
          }, {
            "$ref" : "#/$defs/Layout"
          }, {
            "$ref" : "#/$defs/Link"
          }, {
            "$ref" : "#/$defs/Text"
          } ]
        }
      },
      "additionalProperties" : false
    },
    "FormConfig" : {
      "type" : "object",
      "properties" : {
        "renderer" : {
          "type" : "string"
        },
        "theme" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "Input" : {
      "type" : "object",
      "properties" : {
        "label" : {
          "type" : "string"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "required" : {
          "type" : "boolean"
        },
        "type" : {
          "$ref" : "#/$defs/InputType"
        },
        "value" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "InputType" : {
      "type" : "string",
      "enum" : [ "TEXT", "EMAIL", "PASSWORD", "NUMBER" ]
    },
    "Layout" : {
      "type" : "object",
      "properties" : {
        "components" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/$defs/Component"
          }
        },
        "gridVariant" : {
          "$ref" : "#/$defs/LayoutGridVariant"
        },
        "justifyContent" : {
          "$ref" : "#/$defs/LayoutJustifyContent"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "type" : {
          "$ref" : "#/$defs/LayoutType"
        }
      },
      "additionalProperties" : false
    },
    "LayoutGridVariant" : {
      "type" : "string",
      "enum" : [ "GRID2", "GRID4", "FREE" ]
    },
    "LayoutJustifyContent" : {
      "type" : "string",
      "enum" : [ "NORMAL", "END" ]
    },
    "LayoutType" : {
      "type" : "string",
      "enum" : [ "GRID", "FLEX" ]
    },
    "Link" : {
      "type" : "object",
      "properties" : {
        "href" : {
          "type" : "string"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "name" : {
          "type" : "string"
        }
      },
      "additionalProperties" : false
    },
    "Text" : {
      "type" : "object",
      "properties" : {
        "content" : {
          "type" : "string"
        },
        "lgSpan" : {
          "type" : "string"
        },
        "mdSpan" : {
          "type" : "string"
        },
        "type" : {
          "$ref" : "#/$defs/TextType"
        }
      },
      "additionalProperties" : false
    },
    "TextType" : {
      "type" : "string",
      "enum" : [ "RAW", "MARKDOWN" ]
    }
  },
  "type" : "object",
  "properties" : {
    "$schema" : {
      "type" : "string"
    },
    "id" : {
      "type" : "string",
      "format" : "uuid"
    },
    "config" : {
      "$ref" : "#/$defs/FormConfig"
    },
    "components" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/Component"
      }
    }
  },
  "additionalProperties" : false
}
