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

  Brotkrueml\Schema\:
    resource: '../Classes/*'
    exclude: '../Classes/{AdminPanel,Hooks,Model,Extension.php}'

  Brotkrueml\Schema\JsonLd\Renderer:
    public: true

  Brotkrueml\Schema\TypoScript\TypoScriptToSchema:
    public: true

# Deactivated because of https://forge.typo3.org/issues/90962
#  cache.tx_schema_core:
#    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
#    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
#    arguments: ['tx_schema_core']
#
#  Brotkrueml\Schema\Type\TypeRegistry:
#    arguments:
#      $cache: '@cache.tx_schema_core'

  Brotkrueml\Schema\Cache\PagesCacheService:
    public: true
    arguments:
      $cache: '@cache.pages'

  Brotkrueml\Schema\AdminPanel\SchemaModule:
    public: true

  Brotkrueml\Schema\EventListener\AddBreadcrumbList:
    tags:
      - name: event.listener
        identifier: 'ext-schema/addBreadcrumbList'
        event: Brotkrueml\Schema\Event\InitialiseTypesEvent

  Brotkrueml\Schema\EventListener\AddWebPageType:
    tags:
      - name: event.listener
        identifier: 'ext-schema/addWebPageType'
        event: Brotkrueml\Schema\Event\RenderAdditionalTypesEvent

  Brotkrueml\Schema\EventListener\RegisterTypePropertiesMovedFromOfficialToPending:
    tags:
      - name: event.listener
        identifier: 'ext-schema/registerTypePropertiesMovedFromOfficialToPending'
        event: Brotkrueml\Schema\Event\RegisterAdditionalTypePropertiesEvent

  Brotkrueml\Schema\TypoScript\SchemaContentObject:
    tags:
      - name: frontend.contentobject
        identifier: 'SCHEMA'

  brotkrueml.schema.configuration.module.provider.types:
    class: 'Brotkrueml\Schema\Lowlevel\ConfigurationModuleProvider\Types'
    tags:
      - name: 'lowlevel.configuration.module.provider'
        identifier: 'ext-schema/types'
