services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false

  Wazum\Sluggi\:
    resource: '../Classes/*'
    exclude:
      - '../Classes/Controller/FormSlugAjaxControllerV12.php'
      - '../Classes/Controller/FormSlugAjaxControllerV14.php'
      - '../Classes/Controller/RecordHistoryRollbackControllerV12.php'
      - '../Classes/Controller/RecordHistoryRollbackControllerV14.php'
      - '../Classes/Form/Element/SlugElementV12.php'
      - '../Classes/Form/Element/SlugElementV14.php'
      - '../Classes/Form/Element/SlugSourceElementV12.php'
      - '../Classes/Form/Element/SlugSourceElementV14.php'

  # DataHandler
  Wazum\Sluggi\DataHandler\ClearSlugForExcludedDoktypes:
    public: true

  Wazum\Sluggi\DataHandler\HandlePageCopy:
    public: true

  Wazum\Sluggi\DataHandler\HandlePageUndelete:
    public: true

  Wazum\Sluggi\DataHandler\HandleRecordUndelete:
    public: true

  Wazum\Sluggi\DataHandler\HandlePageMove:
    public: true

  Wazum\Sluggi\DataHandler\HandlePageUpdate:
    public: true

  Wazum\Sluggi\DataHandler\HandleRecordUpdate:
    public: true

  Wazum\Sluggi\DataHandler\PreventLockedSlugEdit:
    public: true

  Wazum\Sluggi\DataHandler\ValidateHierarchyPermission:
    public: true

  Wazum\Sluggi\DataHandler\ValidateLastSegmentOnly:
    public: true

  Wazum\Sluggi\DataHandler\InitializeSyncForNewPage:
    public: true

  Wazum\Sluggi\DataHandler\LockSlugOnFullPathEdit:
    public: true

  Wazum\Sluggi\DataHandler\RestorePermissionsForNestedSlugUpdate:
    public: true

  # Form/Element
  Wazum\Sluggi\Form\Element\SlugElementV12:
    public: true

  Wazum\Sluggi\Form\Element\SlugElementV14:
    public: true

  Wazum\Sluggi\Form\Element\SlugSourceElementV12:
    public: true

  Wazum\Sluggi\Form\Element\SlugSourceElementV14:
    public: true

  # Form/FormDataProvider
  Wazum\Sluggi\Form\FormDataProvider\HideSlugForExcludedPageTypes:
    public: true

  Wazum\Sluggi\Form\FormDataProvider\InitializeSyncField:
    public: true

  # Service
  Wazum\Sluggi\Service\FullPathEditingService:
    public: true

  Wazum\Sluggi\Service\HierarchyPermissionService:
    public: true

  Wazum\Sluggi\Service\LastSegmentValidationService:
    public: true

  Wazum\Sluggi\Service\SlugConfigurationService:
    public: true

  Wazum\Sluggi\Service\SlugElementRenderer:
    public: true

  Wazum\Sluggi\Service\SlugGeneratorService:
    public: true

  Wazum\Sluggi\Service\SlugLockService:
    public: true

  Wazum\Sluggi\Service\SlugSyncService:
    public: true

  Wazum\Sluggi\Service\UserSettingsService:
    public: true

  # Upgrade
  Wazum\Sluggi\Upgrade\ClearExcludedDoktypeSlugsWizard:
    public: true

  # Controller
  Wazum\Sluggi\Controller\RecursiveSlugUpdateController:
    public: true

  # EventListener
  Wazum\Sluggi\EventListener\PreventSelfReferencingRedirect:
    tags:
      - name: event.listener
        identifier: 'sluggi/prevent-self-referencing-redirect-before'
        method: beforePersist
        event: TYPO3\CMS\Redirects\Event\ModifyAutoCreateRedirectRecordBeforePersistingEvent
      - name: event.listener
        identifier: 'sluggi/prevent-self-referencing-redirect-after'
        method: afterPersist
        event: TYPO3\CMS\Redirects\Event\AfterAutoCreateRedirectHasBeenPersistedEvent

  Wazum\Sluggi\EventListener\SkipRedirectOnRequest:
    tags:
      - name: event.listener
        identifier: 'sluggi/skip-redirect-on-request'
        event: TYPO3\CMS\Redirects\Event\SlugRedirectChangeItemCreatedEvent
        after: 'redirects-add-plain-slug-replacement-source,redirects-add-page-type-zero-source'
