# EXAMPLE USAGE
# form:
#   properties:
#     heading: !include:/corpweb2021/includes/dialogs/componentHeading.yaml

$type: switchableField
label: Heading
field: 
  $type: radioButtonGroupField
  layout: vertical
  defaultValue: big
  datasource:
    $type: optionListDatasource
    options:
      - name: big
        value: big
        label: Big headline
      - name: small
        value: small
        label: Small headline
itemProvider:
  $type: jcrChildNodeProvider
forms:
  - name: big
    properties:
      headlineStyle:
        $type: switchableField
        label: Headline style
        field: 
          $type: radioButtonGroupField
          layout: horizontal
          defaultValue: solid
          datasource:
            $type: optionListDatasource
            options:
              - name: solid
                value: solid
                label: Solid
              - name: outlined
                value: outlined
                label: Outlined
        itemProvider:
          $type: jcrChildNodeProvider
        forms:
          - name: solid
            properties:
              solid:
                $type: staticField
                label: ""
                value: ""
          - name: outlined
            properties:
              outlined:
                $type: staticField
                label: ""
                value: ""
      headline:
        $type: textField
        label: Headline
        i18n: true
      subHeadline: 
        $type: textField
        label: Subheadline
        rows: 2
        i18n: true
  - name: small
    properties:
      headline:
        $type: textField
        label: Headline
        i18n: true