imports:
  - { resource: form/*.yml }

services:
  _defaults:
    public: false
    autowire: true
    autoconfigure: true
    bind:
      $multiStoreFeature: '@prestashop.adapter.feature.multistore'
      $defaultCurrencyId: '@=service("prestashop.adapter.legacy.configuration").get("PS_CURRENCY_DEFAULT")'
      $defaultLanguageId: '@=service("prestashop.adapter.legacy.configuration").get("PS_LANG_DEFAULT")'
      $formRenderer: '@twig.form.renderer'
      $requestStack: '@request_stack'
      $locale: '@prestashop.core.localization.locale.context_locale'
      $validate: "@prestashop.adapter.validate"
      $themeRepository: '@prestashop.core.addon.theme.repository'
      $shopThemeName: '@=service("prestashop.adapter.legacy.context").getContext().shop.theme.getName()'

  PrestaShopBundle\Form\:
    resource: "../../../../Form/{Extension,Validator,DataTransformer}/*"

  PrestaShopBundle\Form\FormCloner:
  PrestaShopBundle\Form\FormBuilderModifier:
  PrestaShopBundle\Service\Form\MultistoreConfigurationDropdownRenderer:
  PrestaShopBundle\Service\Form\MultistoreCheckboxEnabler:
  PrestaShopBundle\Form\Admin\Improve\Design\Theme\PageLayoutCustomizationFormFactory:

  # Should be keeped for bc until it is deprecated.
  # legacy parent module still used
  # cannot be autowired because it is abstract
  form.type.translatable.aware:
    abstract: true
    arguments:
      - "@translator"
      - "@=service('prestashop.adapter.legacy.context').getLanguages()"

  form.type.common_type:
    abstract: true

  PrestaShopBundle\Form\Admin\Type\CustomMoneyType:
    alias: 'PrestaShopBundle\Form\Extension\CustomMoneyTypeExtension'
    deprecated:
      package: PrestaShop\PrestaShop
      version: 9.0
