#
# 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.keystone.daemons_hook:
    class: XC\AutoImportBase\LifetimeHook\DaemonsHook
    arguments:
      $services:
        - ['xc', '%env(default::string:XCART_UNITNAME)%', 'keystone']
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: enable, method: onEnable}
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: disable, method: onDisable}
      - {name: xcart.auto.daemons_hook}

  XC\Keystone\LifetimeHook\Install:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: install, method: onInstall}
  XC\Keystone\LifetimeHook\Upgrade\UpgradeTo553build0FillWarehouses:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: upgrade, method: onUpgrade, version: 5.5.3.0}
  XC\Keystone\LifetimeHook\Upgrade\UpgradeTo553build0TransferDataFromKeystoneInventoryToProductLocationStock:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: upgrade, method: onUpgrade, version: 5.5.3.0}
  XC\Keystone\LifetimeHook\Upgrade\UpgradeTo553build2SettingsChanges:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: upgrade, method: onUpgrade, version: 5.5.3.2}
  XC\Keystone\LifetimeHook\Upgrade\UpgradeTo557build0DeleteOrderHistoryTask:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-Keystone, type: upgrade, method: onUpgrade, version: 5.5.7.0}
