#
# Module services
#
# Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
# See https://www.x-cart.com/license-agreement.html for license details.

services:
  _defaults:
    autowire: true

  XC\AmazonSPAPI\LifetimeHook\Install:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AmazonSPAPI, type: install, method: onInstall}

  xc.amazon.daemons_hook:
    class: XC\AmazonSPAPI\LifetimeHook\DaemonsHook
    arguments:
      $services:
        - [ 'xc', '%env(default::string:XCART_UNITNAME)%', 'amazon-feeds' ]
        - [ 'xc', '%env(default::string:XCART_UNITNAME)%', 'amazon' ]
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AmazonSPAPI, type: enable, method: onEnable}
      - {name: xcart.lifetime-hook, moduleId: XC-AmazonSPAPI, type: disable, method: onDisable}
      - {name: xcart.amazon.daemons_hook}
