services:

  HeimrichHannot\FieldpaletteBundle\EventListener\Contao\:
    resource: '../../EventListener/Contao/*'
    autowire: true
    public: true

  huh.fieldpalette.listener.hook:
    class: HeimrichHannot\FieldpaletteBundle\EventListener\HookListener
    public: true
    arguments:
      - '@huh.fieldpalette.dca.extractor'
      - '@service_container'
      - '@contao.framework'
  huh.fieldpalette.listener.callback:
    class: HeimrichHannot\FieldpaletteBundle\EventListener\CallbackListener
    public: true
    arguments:
       - '@contao.framework'
       - '@huh.fieldpalette.manager'
       - '@huh.fieldpalette.dca.handler'
       - '@request_stack'
       - '@huh.utils.container'
       - '@huh.utils.url'
       - '@huh.utils.routing'
       - '@monolog.logger.contao'
  huh.fieldpalette.element.button:
    class: HeimrichHannot\FieldpaletteBundle\Element\ButtonElement
    public: true
    arguments:
      - '@contao.framework'
      - '%huh.fieldpalette.table%'
      - '@twig'
      - '@huh.utils.routing'
      - '@huh.fieldpalette.dca.handler'
  huh.fieldpalette.registry:
    class: HeimrichHannot\FieldpaletteBundle\Registry\FieldPaletteRegistry
  huh.fieldpalette.manager:
    class: HeimrichHannot\FieldpaletteBundle\Manager\FieldPaletteModelManager
    public: true
  huh.fieldpalette.dca.extractor:
    class: HeimrichHannot\FieldpaletteBundle\DcaHelper\DcaExtractor
    arguments: ['@service_container']
  huh.fieldpalette.dca.handler:
    class: HeimrichHannot\FieldpaletteBundle\DcaHelper\DcaHandler
    public: true
    arguments:
      - '%huh.fieldpalette.table%'
      - '@contao.framework'
      - '@huh.fieldpalette.manager'
      - '@request_stack'
      - '@huh.fieldpalette.registry'
  # Symfony 4 autowire convention fix (ambiguous namespace alias)
  HeimrichHannot\FieldpaletteBundle\Manager\FieldPaletteModelManager: '@huh.fieldpalette.manager'
  HeimrichHannot\FieldpaletteBundle\DcaHelper\DcaHandler: '@huh.fieldpalette.dca.handler'