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

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

  XC\ATD\LifetimeHook\Upgrade\UpgradeTo550build2SettingsChanges:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-ATD, type: upgrade, method: onUpgrade, version: 5.5.0.2}
