imports:
    - { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" }

    - { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }
    - { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }

    - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }
    
    - { resource: "../../themes/BootstrapChildTheme/config/config.yaml" } 

    - { resource: "@SyliusPayPalPlugin/Resources/config/config.yaml" }
    - { resource: "../parameters.yaml" }

parameters:
    sylius_core.public_dir: '%kernel.project_dir%/public'

when@dev:
    sylius_api:
        enabled: true

sylius_addressing:
    resources:
        address:
            classes:
                model: App\Entity\Addressing\Address
        country:
            classes:
                model: App\Entity\Addressing\Country
        province:
            classes:
                model: App\Entity\Addressing\Province
        zone:
            classes:
                model: App\Entity\Addressing\Zone
        zone_member:
            classes:
                model: App\Entity\Addressing\ZoneMember

sylius_attribute:
    resources:
        product:
            attribute:
                classes:
                    model: App\Entity\Product\ProductAttribute
                translation:
                    classes:
                        model: App\Entity\Product\ProductAttributeTranslation
            attribute_value:
                classes:
                    model: App\Entity\Product\ProductAttributeValue

sylius_channel:
    resources:
        channel:
            classes:
                model: App\Entity\Channel\Channel
sylius_core:
    resources:
        product_image:
            classes:
                model: App\Entity\Product\ProductImage
        taxon_image:
            classes:
                model: App\Entity\Taxonomy\TaxonImage
        product_taxon:
            classes:
                model: App\Entity\Product\ProductTaxon
        channel_pricing:
            classes:
                model: App\Entity\Channel\ChannelPricing
        channel_price_history_config:
            classes:
                model: App\Entity\Channel\ChannelPriceHistoryConfig
        channel_pricing_log_entry:
            classes:
                model: App\Entity\Channel\ChannelPricingLogEntry

sylius_currency:
    resources:
        currency:
            classes:
                model: App\Entity\Currency\Currency
        exchange_rate:
            classes:
                model: App\Entity\Currency\ExchangeRate

sylius_customer:
    resources:
        customer:
            classes:
                model: App\Entity\Customer\Customer
                form: App\Form\Type\CustomerType # Utilisation du formulaire personnalisé

        customer_group:
            classes:
                model: App\Entity\Customer\CustomerGroup

sylius_locale:
    resources:
        locale:
            classes:
                model: App\Entity\Locale\Locale



sylius_order:
    resources:
        order:
            classes:
                model: App\Entity\Order\Order
                controller: App\Controller\OrderController

        order_item:
            classes:
                model: App\Entity\Order\OrderItem
        order_item_unit:
            classes:
                model: App\Entity\Order\OrderItemUnit
        adjustment:
            classes:
                model: App\Entity\Order\Adjustment
        order_sequence:
            classes:
                model: App\Entity\Order\OrderSequence

sylius_payment:
    resources:
        payment_method:
            classes:
                model: App\Entity\Payment\PaymentMethod
            translation:
                classes:
                    model: App\Entity\Payment\PaymentMethodTranslation
        payment:
            classes:
                model: App\Entity\Payment\Payment

sylius_payum:
    resources:
        payment_security_token:
            classes:
                model: App\Entity\Payment\PaymentSecurityToken
        gateway_config:
            classes:
                model: App\Entity\Payment\GatewayConfig

sylius_product:
    resources:
        product:
            classes:
                model: App\Entity\Product\Product
                controller: App\Controller\ProductController
            translation:
                classes:
                    model: App\Entity\Product\ProductTranslation
        product_variant:
            classes:
                model: App\Entity\Product\ProductVariant
            translation:
                classes:
                    model: App\Entity\Product\ProductVariantTranslation
        product_option:
            classes:
                model: App\Entity\Product\ProductOption
            translation:
                classes:
                    model: App\Entity\Product\ProductOptionTranslation
        product_option_value:
            classes:
                model: App\Entity\Product\ProductOptionValue
            translation:
                classes:
                    model: App\Entity\Product\ProductOptionValueTranslation
        product_association:
            classes:
                model: App\Entity\Product\ProductAssociation
        product_association_type:
            classes:
                model: App\Entity\Product\ProductAssociationType
            translation:
                classes:
                    model: App\Entity\Product\ProductAssociationTypeTranslation

sylius_promotion:
    resources:
        catalog_promotion:
            classes:
                model: App\Entity\Promotion\CatalogPromotion
        catalog_promotion_action:
            classes:
                model: App\Entity\Promotion\CatalogPromotionAction
        catalog_promotion_scope:
            classes:
                model: App\Entity\Promotion\CatalogPromotionScope
        promotion:
            classes:
                model: App\Entity\Promotion\Promotion
        promotion_rule:
            classes:
                model: App\Entity\Promotion\PromotionRule
        promotion_action:
            classes:
                model: App\Entity\Promotion\PromotionAction
        promotion_coupon:
            classes:
                model: App\Entity\Promotion\PromotionCoupon

sylius_review:
    resources:
        product:
            review:
                classes:
                    model: App\Entity\Product\ProductReview

sylius_shipping:
    resources:
        shipment:
            classes:
                model: App\Entity\Shipping\Shipment
        shipping_method:
            classes:
                model: App\Entity\Shipping\ShippingMethod
            translation:
                classes:
                    model: App\Entity\Shipping\ShippingMethodTranslation
        shipping_category:
            classes:
                model: App\Entity\Shipping\ShippingCategory

sylius_taxation:
    resources:
        tax_category:
            classes:
                model: App\Entity\Taxation\TaxCategory
        tax_rate:
            classes:
                model: App\Entity\Taxation\TaxRate

sylius_taxonomy:
    resources:
        taxon:
            classes:
                model: App\Entity\Taxonomy\Taxon
                form: App\Form\Type\TaxonType
            translation:
                classes:
                    model: App\Entity\Taxonomy\TaxonTranslation
sylius_user:
    resources:
        admin:
            user:
                classes:
                    model: App\Entity\User\AdminUser
        shop:
            user:
                classes:
                    form: App\Form\Type\ShopUserType
        oauth:
            user:
                classes:
                    model: App\Entity\User\UserOAuth

sylius_shop:
    product_grid:
        include_all_descendants: true

sylius_theme:
    sources:
        filesystem:
            scan_depth: 1
            directories:
                - "%kernel.project_dir%/vendor/sylius/bootstrap-theme"
                - "%kernel.project_dir%/themes"


winzou_state_machine:
    sylius_order_payment:
        callbacks:
            after:
                sylius.payment.post_complete:
                    on: ['pay']
                    do: ['@app.event_listener.payment_complete_listener', 'onPaymentComplete']
                    # App\EventListener\PaymentCompleteListener
                    args: ['object'] # l'objet de la transition, généralement le paiement