services:
  _defaults:
    public: true

  # KPI Row presenter
  prestashop.core.kpi_row.presenter:
    class: PrestaShop\PrestaShop\Core\Kpi\Row\KpiRowPresenter

  # 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.adapter.kpi.conversion_rate'
        - '@prestashop.adapter.kpi.abandoned_cart'
        - '@prestashop.adapter.kpi.average_order_value'
        - '@prestashop.adapter.kpi.net_profit_per_visit'
      - '@prestashop.core.hook.dispatcher'
      - 'orders'
