form:
  implementationClass: info.magnolia.ui.javascript.form.FormViewWithChangeListener
  properties:
    headlineLevel:
      $type: comboBoxField
      datasource:
        $type: optionListDatasource
        options:
          - name: big
            value: big
          - name: medium
            value: medium
          - name: small
            value: small
    headline:
      $type: textField
      i18n: true
      required: true
    text:
      $type: richTextField
      i18n: true
    image:
      label: Frontify Image
      $type: frontifyWidgetField
      required: true
#      class: info.magnolia.ui.field.LinkFieldDefinition
#      buttonSelectNewLabel: Select new ...
#      buttonSelectOtherLabel: Select another ...
#      chooser:
#        workbenchChooser:
#          appName: dam-chooser
    imagePosition:
      $type: comboBoxField
      datasource:
        $type: optionListDatasource
        options:
          - name: above
            value: above
          - name: below
            value: below
    constrainAspectRatio:
      $type: checkBoxField
      defaultValue: true
    imageAltText:
      $type: textField
    imageTitle:
      $type: textField
      i18n: true
    imageCaption:
      $type: textField
      i18n: true
    imageCredit:
      $type: textField
      i18n: true
    campaigns:
      label: Campaigns
      $type: twinColSelectField
      leftColumnCaption: "Available campaigns"
      rightColumnCaption: "Campaigns added"
      converterClass: info.magnolia.ui.editor.converter.JcrNodeToWorkspaceAndIdConverter
      datasource:
        $type: jcrDatasource
        workspace: campaigns
        rootPath: /
        describeByProperty: displayName
        allowedNodeTypes:
          - mgnl:campaign
    campaignsMulti:
      i18n: true
      $type: jcrMultiValueField
      field:
        $type: comboBoxField
        #converterClass: info.magnolia.ui.editor.converter.JcrNodeToWorkspaceAndIdConverter
        datasource:
          $type: jcrDatasource
          workspace: campaigns
          describeByProperty: displayName
          allowedNodeTypes:
            - mgnl:campaign
    hotel:
      $type: jcrMultiField
      maxItems: 10
      i18n: true
      field:
        $type: compositeField
        i18n: false
        properties:
          oldHotelImageLink:
            $type: textField
            label: Magnolia 5.7 image link
            readOnly: true
            i18n: false
          doc:
            label: Document
            $type: frontifyWidgetField
            height: 220
            i18n: false
    colorField:
      label: Color field
      $type: javascriptField
      fieldScript: /frontify-dam-connector/webresources/colorField.html
      height: 40
    secondImage:
      label: Frontify Image
      $type: frontifyWidgetField
    colorMulti:
      $type: jcrMultiField
      field:
        $type: compositeField
        properties:
          color:
            label: Color field
            $type: javascriptField
            fieldScript: /frontify-dam-connector/webresources/colorField.html
            height: 40
    frontifyMulti:
      i18n: true
      $type: jcrMultiField
      field:
        $type: compositeField
        properties:
          fimage:
            required: true
            label: Frontify Image
            $type: frontifyWidgetField
    composite:
      $type: compositeField
      itemProvider:
        $type: jcrChildNodeProvider
      properties:
        comText:
          label: composite text
          $type: textField
        country:
          label: composite frontify
          $type: frontifyWidgetField

  layout:
    $type: tabbedLayout
    tabs:
      tabText:
        fields:
          - name: headlineLevel
          - name: headline
          - name: text
          #- name: campaigns
          - name: campaignsMulti
          - name: hotel
          - name: colorField
          - name: colorMulti
          - name: composite
      tabImage:
        fields:
          - name: image
          - name: imagePosition
          - name: constrainAspectRatio
          - name: imageAltText
          - name: imageTitle
          - name: imageCaption
          - name: imageCredit
          - name: secondImage
          - name: frontifyMulti
