services:
  _defaults:
    public: true

  prestashop.hooks_registry:
    class: PrestaShopBundle\DataCollector\HookRegistry

  prestashop.hooks_collector:
    class: PrestaShopBundle\DataCollector\HookDataCollector
    arguments: [ '@prestashop.hooks_registry' ]
    public: false
    tags:
      - { name: data_collector, template: '@PrestaShop/Admin/WebProfiler/hooks_collector.html.twig', id: 'ps.hooks_collector' }

  prestashop.bundle.data_collector.commands_and_queries_collector:
    class: PrestaShopBundle\DataCollector\CommandsAndQueriesDataCollector
    arguments:
      - '@prestashop.core.command_bus.executed_command_registry'
    tags:
      - name: data_collector
        id: ps.commands_and_queries_collector
        template: '@PrestaShop/Admin/WebProfiler/commands_and_queries.html.twig'

  # Web Profiler Bundle
  data_collector.config:
    class: Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector
    arguments: [ "PrestaShop", "@=service('prestashop.core.foundation.version').getSemVersion()" ]
    public: false
    calls:
      - [ "setKernel", [ "@kernel" ] ]
    tags:
      - { name: data_collector, template: "@PrestaShop/Admin/WebProfiler/config.html.twig", id: "config", priority: "-255" }
