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

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

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

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo552build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.2.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo554build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.4.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo555build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.5.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo557build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.7.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo558build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.8.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo559build0:
    tags:
      - { name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.9.0 }

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo5511build0:
    tags:
      - { name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.11.0 }

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo5510build0:
    tags:
      - {name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.10.0}

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo5511build2RemoveImageTask:
    tags:
      - { name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.11.2 }

  XC\AutoSync\LifetimeHook\Upgrade\UpgradeTo5512build2SettingsChanges:
    tags:
      - { name: xcart.lifetime-hook, moduleId: XC-AutoSync, type: upgrade, method: onUpgrade, version: 5.5.12.2 }
