services:
  _defaults:
    autowire: true
    autoconfigure: true

  # whoami
  xcart.logic.storefront.auth.whoami.action:
    class: XCart\Logic\Action\Storefront\Auth\Whoami\Action
    arguments:
      $dataSource: '@xcart.data_source.profile.read'
      $responseAssembler: '@xcart.logic.storefront.auth.whoami.response.assembler'
    tags:
      - {name: xcart.logic.action, request: XCart\Logic\Action\Storefront\Principal\GetOne\DTO\Request, response: XCart\Logic\Action\Storefront\Principal\GetOne\DTO\Response}

  xcart.logic.storefront.auth.whoami.response.assembler:
    class: XCart\Logic\Action\Storefront\Auth\Whoami\Assembler\ResponseAssembler

  XCart\Transformer\XLite\Model\Profile\Logic\Entity\PrincipalInterface: '@XCart\Transformer\XLite\Model\Profile\Logic\Entity\Principal'
  XCart\Transformer\XLite\Model\Profile\Logic\Entity\Principal:
    class: XCart\Transformer\XLite\Model\Profile\Logic\Entity\Storefront\Principal
    arguments:
      $factory: '@XCart\Factory\Logic\Entity\Storefront\PrincipalInterface'

  # reset_password
  xcart.logic.storefront.reset_password_action.reset_password.action:
    class: XCart\Logic\Action\Storefront\ResetPasswordAction\ResetPassword\Action
    arguments:
      $profileRepository: '@xcart.repository.profile'
