#
# OpenGraph mixin
#
'Neos.Seo:OpenGraphMixin':
  abstract: true
  ui:
    inspector:
      groups:
        openGraph:
          label: i18n
          icon: 'icon-share-alt'
          position: 300
          tab: seo
  properties:
    openGraphType:
      type: string
      ui:
        label: i18n
        inspector:
          group: 'openGraph'
          editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
          editorOptions:
            allowEmpty: true
            placeholder: i18n
            values:
              website:
                label: i18n
                icon: 'icon-file'
              article:
                label: i18n
                icon: 'icon-newspaper'
    openGraphTitle:
      type: string
      ui:
        label: i18n
        reloadIfChanged: true
        inspector:
          group: 'openGraph'
          editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor'
          editorOptions:
            placeholder: 'ClientEval: node.properties.titleOverride || node.properties.title'
      validation:
        'Neos.Neos/Validation/StringLengthValidator':
          maximum: 60
    openGraphDescription:
      type: string
      ui:
        label: i18n
        inspector:
          group: 'openGraph'
          editor: 'Neos.Neos/Inspector/Editors/TextAreaEditor'
          editorOptions:
            placeholder: 'ClientEval: node.properties.metaDescription || "Neos.Seo:NodeTypes.OpenGraphMixin:properties.openGraphDescription.textAreaEditor.placeholder"'
      validation:
        'Neos.Neos/Validation/StringLengthValidator':
          maximum: 200
    openGraphImage:
      type: Neos\Media\Domain\Model\ImageInterface
      ui:
        label: i18n
        inspector:
          group: 'openGraph'
          editorOptions:
            features:
              crop: true
            crop:
              aspectRatio:
                options:
                  square:
                    width: 1080
                    height: 1080
                  twoOne:
                    width: 1200
                    height: 628
                    label: 'Landscape'
                  fourFive: ~
                  fiveSeven: ~
                  twoThree: ~
                  fourThree: ~
                  sixteenNine: ~
                enableOriginal: false
                allowCustom: false
                defaultOption: twoOne
                forceCrop: true
