prototypes:
  standard:
    formElementsDefinition:
      ImageUpload:
        formEditor:
          editors:
            100:
              identifier: header
              templateName: Inspector-FormElementHeaderEditor
            200:
              identifier: label
              templateName: Inspector-TextEditor
              label: formEditor.elements.FormElement.editor.label.label
              propertyPath: label
            230:
              identifier: elementDescription
              templateName: Inspector-TextEditor
              label: formEditor.elements.FormElement.editor.elementDescription.label
              propertyPath: properties.elementDescription
            300:
              identifier: allowedMimeTypes
              templateName: Inspector-MultiSelectEditor
              label: formEditor.elements.ImageUpload.editor.allowedMimeTypes.label
              propertyPath: properties.allowedMimeTypes
              selectOptions:
                10:
                  value: image/jpeg
                  label: formEditor.elements.ImageUpload.editor.allowedMimeTypes.jpg
                20:
                  value: image/png
                  label: formEditor.elements.ImageUpload.editor.allowedMimeTypes.png
                30:
                  value: image/bmp
                  label: formEditor.elements.ImageUpload.editor.allowedMimeTypes.bmp
            400:
              identifier: saveToFileMount
              templateName: Inspector-SingleSelectEditor
              label: formEditor.elements.FileUploadMixin.editor.saveToFileMount.label
              propertyPath: properties.saveToFileMount
              selectOptions:
                10:
                  value: '1:/user_upload/'
                  label: '1:/user_upload/'

            600:
              identifier: autocomplete
              templateName: Inspector-SingleSelectEditor
              label: formEditor.elements.FormElement.editor.autocomplete.label
              propertyPath: properties.fluidAdditionalAttributes.autocomplete
              doNotSetIfPropertyValueIsEmpty: true
              selectOptions:
                10:
                  value: ''
                  label: formEditor.elements.FormElement.editor.autocomplete.option.none
                15:
                  value: 'off'
                  label: formEditor.elements.FormElement.editor.autocomplete.option.off
                20:
                  value: 'photo'
                  label: formEditor.elements.FormElement.editor.autocomplete.option.photo
            700:
              identifier: gridColumnViewPortConfiguration
              templateName: Inspector-GridColumnViewPortConfigurationEditor
              label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.label
              configurationOptions:
                viewPorts:
                  10:
                    viewPortIdentifier: xs
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.xs.label
                  20:
                    viewPortIdentifier: sm
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.sm.label
                  30:
                    viewPortIdentifier: md
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.md.label
                  40:
                    viewPortIdentifier: lg
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.lg.label
                  50:
                    viewPortIdentifier: xl
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.xl.label
                  60:
                    viewPortIdentifier: xxl
                    label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.xxl.label
                numbersOfColumnsToUse:
                  label: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.label
                  propertyPath: 'properties.gridColumnClassAutoConfiguration.viewPorts.{@viewPortIdentifier}.numbersOfColumnsToUse'
                  fieldExplanationText: formEditor.elements.FormElement.editor.gridColumnViewPortConfiguration.numbersOfColumnsToUse.fieldExplanationText
            800:
              identifier: requiredValidator
              templateName: Inspector-RequiredValidatorEditor
              label: formEditor.elements.FormElement.editor.requiredValidator.label
              validatorIdentifier: NotEmpty
              propertyPath: properties.fluidAdditionalAttributes.required
              propertyValue: required
              configurationOptions:
                validationErrorMessage:
                  label: formEditor.elements.FormElement.editor.requiredValidator.validationErrorMessage.label
                  propertyPath: properties.validationErrorMessages
                  fieldExplanationText: formEditor.elements.FormElement.editor.requiredValidator.validationErrorMessage.fieldExplanationText
                  errorCodes:
                    10: 1221560910
                    20: 1221560718
                    30: 1347992400
                    40: 1347992453
            900:
              identifier: validators
              templateName: Inspector-ValidatorsEditor
              label: formEditor.elements.FileUploadMixin.editor.validators.label
              selectOptions:
                10:
                  value: ''
                  label: formEditor.elements.FileUploadMixin.editor.validators.EmptyValue.label
                20:
                  value: FileSize
                  label: formEditor.elements.FileUploadMixin.editor.validators.FileSize.label
            9999:
              identifier: removeButton
              templateName: Inspector-RemoveElementEditor
          predefinedDefaults:
            properties:
              saveToFileMount: '1:/user_upload/'
              allowedMimeTypes:
                - image/jpeg
          propertyCollections:
            validators:
              10:
                identifier: FileSize
                editors:
                  100:
                    identifier: header
                    templateName: Inspector-CollectionElementHeaderEditor
                    label: formEditor.elements.FileUploadMixin.validators.FileSize.editor.header.label
                  150:
                    identifier: maximumFileSize
                    templateName: Inspector-MaximumFileSizeEditor
                    label: formEditor.elements.FileUpload.editor.maximumFileSize.label
                  200:
                    identifier: minimum
                    templateName: Inspector-TextEditor
                    label: formEditor.elements.MinimumMaximumEditorsMixin.editor.minimum.label
                    propertyPath: options.minimum
                    propertyValidators:
                      10: FileSize
                  300:
                    identifier: maximum
                    templateName: Inspector-TextEditor
                    label: formEditor.elements.MinimumMaximumEditorsMixin.editor.maximum.label
                    propertyPath: options.maximum
                    propertyValidators:
                      10: FileSize
                  9999:
                    identifier: removeButton
                    templateName: Inspector-RemoveElementEditor
          label: formEditor.elements.ImageUpload.label
          description: formEditor.elements.ImageUpload.description
          group: custom
          groupSorting: 400
          iconIdentifier: form-image-upload
        implementationClassName: TYPO3\CMS\Form\Domain\Model\FormElements\FileUpload
        properties:
          containerClassAttribute: input
          elementClassAttribute: lightbox
          elementErrorClassAttribute: error
          saveToFileMount: '1:/user_upload/'
          allowedMimeTypes: []
          imageLinkMaxWidth: 500
          imageMaxWidth: 500
          imageMaxHeight: 500
        variants:
          -
            identifier: template-variant
            condition: 'getRootFormProperty("renderingOptions.templateVariant") == "version2"'
            properties:
              containerClassAttribute: 'form-element form-element-imageupload mb-3'
              elementClassAttribute: 'form-control lightbox'
              elementErrorClassAttribute: ~
              labelClassAttribute: form-label
    formEditor:
      formEditorPartials:
        FormElement-ImageUpload: Stage/FileUploadTemplate
