services:
  _defaults:
    public: true
# Repositories
  Apaczka\Prestashop\Model\ApiAccessRepositoryInterface:
    class: Apaczka\Prestashop\Repository\InConfiguration\ApiAccessRepository
    arguments:
      - '@prestashop.adapter.legacy.configuration'
  Apaczka\Prestashop\Model\ServicesRepositoryInterface:
    class: Apaczka\Prestashop\Repository\InConfiguration\ServicesRepository
    arguments:
      - '@prestashop.adapter.legacy.configuration'
      - '@Apaczka\Prestashop\Provider\DeliveryServicesProvider'
  Apaczka\Prestashop\Model\SendingPointsRepositoryInterface:
    class: Apaczka\Prestashop\Repository\InConfiguration\SendingPointsRepository
    arguments:
      - '@prestashop.adapter.legacy.configuration'
  Apaczka\Prestashop\Model\PickupHoursRepositoryInterface:
    class: Apaczka\Prestashop\Repository\InConfiguration\PickupHoursRepository
    arguments:
      - '@prestashop.adapter.legacy.configuration'
  Apaczka\Prestashop\Model\PointsRepositoryInterface:
    class: Apaczka\Prestashop\Repository\InConfiguration\PointsRepository
    arguments:
      - '@prestashop.adapter.legacy.configuration'
      - '@Apaczka\Prestashop\Provider\ApiClientProvider'
  Apaczka\Prestashop\Model\SenderRepositoryInterface:
    class: Apaczka\Prestashop\Repository\Doctrine\SenderRepository
    factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
    arguments:
      - Apaczka\Prestashop\Entity\ApaczkaSender
  Apaczka\Prestashop\Model\OrderRepositoryInterface:
    class: Apaczka\Prestashop\Repository\Doctrine\OrderRepository
    factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
    arguments:
      - Apaczka\Prestashop\Entity\ApaczkaOrder
  Apaczka\Prestashop\Model\PackageRepositoryInterface:
    class: Apaczka\Prestashop\Repository\Doctrine\PackageRepository
    factory: [ "@doctrine.orm.default_entity_manager", getRepository ]
    arguments:
      - Apaczka\Prestashop\Entity\ApaczkaPackage
    calls:
      - method: setPackageTypesProvider
        arguments:
          - '@Apaczka\Prestashop\Provider\PackageTypesProvider'
# Controllers
  Apaczka\Prestashop\Controller\Admin\SettingsController:
    class: Apaczka\Prestashop\Controller\Admin\SettingsController
    arguments:
      - '@Apaczka\Prestashop\Model\ApiAccessRepositoryInterface'
      - '@Apaczka\Prestashop\Model\SenderRepositoryInterface'
      - '@Apaczka\Prestashop\Model\ServicesRepositoryInterface'
      - '@Apaczka\Prestashop\Model\PackageRepositoryInterface'
      - '@Apaczka\Prestashop\Model\SendingPointsRepositoryInterface'
      - '@Apaczka\Prestashop\Model\PickupHoursRepositoryInterface'
      - '@Apaczka\Prestashop\Provider\ServiceProvider'
      - '@Apaczka\Prestashop\Service\ValidateApiAccessDataService'
  Apaczka\Prestashop\Controller\Admin\SenderTemplateController:
    class: Apaczka\Prestashop\Controller\Admin\SenderTemplateController
    arguments:
      - '@Apaczka\Prestashop\Model\SenderRepositoryInterface'
  Apaczka\Prestashop\Controller\Admin\PackageTemplateController:
    class: Apaczka\Prestashop\Controller\Admin\PackageTemplateController
    arguments:
      - '@Apaczka\Prestashop\Model\PackageRepositoryInterface'
      - '@Apaczka\Prestashop\Model\ServicesRepositoryInterface'
  Apaczka\Prestashop\Controller\Admin\OrderController:
    class: Apaczka\Prestashop\Controller\Admin\OrderController
    arguments:
      - '@Apaczka\Prestashop\Model\SenderRepositoryInterface'
      - '@Apaczka\Prestashop\Model\ServicesRepositoryInterface'
      - '@Apaczka\Prestashop\Model\PackageRepositoryInterface'
      - '@Apaczka\Prestashop\Model\PickupHoursRepositoryInterface'
      - '@Apaczka\Prestashop\Model\SendingPointsRepositoryInterface'
      - '@Apaczka\Prestashop\Model\OrderRepositoryInterface'
      - '@Apaczka\Prestashop\Service\MapOrderedPointService'
      - '@Apaczka\Prestashop\Provider\ServiceProvider'
      - '@Apaczka\Prestashop\Helper\CodHelper'
# Providers
  Apaczka\Prestashop\Provider\ServiceProvider:
    class: Apaczka\Prestashop\Provider\ServiceProvider
    arguments:
      - '@service_container'
  Apaczka\Prestashop\Provider\ApiClientProvider:
    class: Apaczka\Prestashop\Provider\ApiClientProvider
    arguments:
      - '@Apaczka\Prestashop\Provider\ServiceProvider'
  Apaczka\Prestashop\Provider\DeliveryServicesProvider:
    class: Apaczka\Prestashop\Provider\DeliveryServicesProvider
    arguments:
      - '@Apaczka\Prestashop\Provider\ApiClientProvider'
  Apaczka\Prestashop\Provider\PackageTypesProvider:
    class: Apaczka\Prestashop\Provider\PackageTypesProvider
    arguments:
      - '@Apaczka\Prestashop\Provider\ApiClientProvider'
# Other services
  Apaczka\Prestashop\Service\MapOrderedPointService:
    class: Apaczka\Prestashop\Service\MapOrderedPointService
    arguments:
      - '@doctrine.orm.default_entity_manager'
  Apaczka\Prestashop\Service\ValidateApiAccessDataService:
    class: Apaczka\Prestashop\Service\ValidateApiAccessDataService
  Apaczka\Prestashop\Helper\CodHelper:
    class: Apaczka\Prestashop\Helper\CodHelper