services:
  _defaults:
    public: true

  # KPI Row presenter
  PrestaShop\PrestaShop\Core\Kpi\Row\KpiRowPresenter:
    public: false

  prestashop.core.kpi_row.presenter:
    alias: PrestaShop\PrestaShop\Core\Kpi\Row\KpiRowPresenter
    public: true
    deprecated:
      package: PrestaShop\PrestaShop
      version: 9.0

  # KPI Row factories
  prestashop.core.kpi_row.factory.translations_page:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@prestashop.adapter.kpi.enabled_languages'
        - '@prestashop.adapter.kpi.main_country'
        - '@prestashop.adapter.kpi.translations'
      - '@prestashop.core.hook.dispatcher'
      - 'translations'

  prestashop.core.kpi_row.factory.categories:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@prestashop.adapter.kpi.disabled_categories'
        - '@prestashop.adapter.kpi.empty_categories'
        - '@prestashop.adapter.kpi.top_category'
        - '@prestashop.adapter.kpi.average_products_in_category'
      - '@prestashop.core.hook.dispatcher'
      - 'categories'

  prestashop.core.kpi_row.factory.customers:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@prestashop.adapter.kpi.most_common_customers_gender'
        - '@prestashop.adapter.kpi.average_customer_age'
        - '@prestashop.adapter.kpi.order_per_customer'
        - '@prestashop.adapter.kpi.newsletter_registrations'
      - '@prestashop.core.hook.dispatcher'
      - 'customers'

  prestashop.core.kpi_row.factory.cart:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@prestashop.adapter.kpi.shopping_cart_total_kpi'
      - '@prestashop.core.hook.dispatcher'
      - 'cart'

  prestashop.core.kpi_row.factory.orders:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@PrestaShop\PrestaShop\Adapter\Kpi\ConversionRateKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\AbandonedCartKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\AverageOrderValueKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\NetProfitPerVisitKpi'
      - '@prestashop.core.hook.dispatcher'
      - 'orders'

  prestashop.core.kpi_row.factory.carts:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\HookableKpiRowFactory
    arguments:
      - - '@PrestaShop\PrestaShop\Adapter\Kpi\ConversionRateKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\AbandonedCartKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\AverageOrderValueKpi'
        - '@PrestaShop\PrestaShop\Adapter\Kpi\NetProfitPerVisitKpi'
      - '@prestashop.core.hook.dispatcher'
      - 'carts'
