{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "operationId": "headerFooters.resolve",
  "schemas": {
    "input": {
      "type": "object",
      "properties": {
        "target": {
          "type": "object",
          "properties": {
            "kind": {
              "const": "headerFooterSlot"
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            },
            "headerFooterKind": {
              "enum": [
                "header",
                "footer"
              ]
            },
            "variant": {
              "enum": [
                "default",
                "first",
                "even"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "section",
            "headerFooterKind",
            "variant"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "target"
      ]
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "explicit"
            },
            "refId": {
              "type": "string"
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            }
          },
          "additionalProperties": false,
          "required": [
            "status",
            "refId",
            "section"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "inherited"
            },
            "refId": {
              "type": "string"
            },
            "resolvedFromSection": {
              "$ref": "#/$defs/SectionAddress"
            },
            "resolvedVariant": {
              "enum": [
                "default",
                "first",
                "even"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "status",
            "refId",
            "resolvedFromSection",
            "resolvedVariant"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "const": "none"
            }
          },
          "additionalProperties": false,
          "required": [
            "status"
          ]
        }
      ]
    }
  }
}
