{% sw_extends '@Storefront/storefront/page/product-detail/buy-widget-form.html.twig' %}
{% set isBootstrap5 = feature('v6.5.0.0') or getAllFeatures()['v6.6.0.0'] is defined %}
{% block page_product_detail_buy_container %}
{{ parent() }}
{% block page_product_detail_buy_container_paypal %}
{% if buyable and product.calculatedCheapestPrice.totalPrice > 0 and product.extensions[constant('Swag\\PayPal\\Checkout\\Cart\\Service\\ExcludedProductValidator::PRODUCT_EXCLUDED_FOR_PAYPAL')] is null %}
{# @var \Swag\PayPal\Checkout\ExpressCheckout\ExpressCheckoutButtonData expressSettings #}
{% set expressSettings = page.extensions[constant('Swag\\PayPal\\Checkout\\ExpressCheckout\\ExpressCheckoutSubscriber::PAYPAL_EXPRESS_CHECKOUT_BUTTON_DATA_EXTENSION_ID')] %}
{% if expressSettings.productDetailEnabled %}
<div class="{{ isBootstrap5 ? 'row g-2 mt-0' : 'form-row mt-3' }} justify-content-end">
{% sw_include '@SwagPayPal/storefront/component/ecs-spb-checkout/ecs-button.html.twig' with {button_class: 'col-8'} %}
</div>
{% endif %}
{% endif %}
{# @var \Swag\PayPal\Installment\Banner\BannerData installmentBanner #}
{% set installmentBanner = page.extensions[constant('Swag\\PayPal\\Installment\\Banner\\InstallmentBannerSubscriber::PAYPAL_INSTALLMENT_BANNER_DATA_EXTENSION_ID')] %}
{% if installmentBanner is not null %}
<div class="{{ isBootstrap5 ? 'row g-2 mt-0' : 'form-row mt-3' }} mb-4 justify-content-end">
<div class="{{ buyable ? 'col-8' : 'col-12' }}"
data-swag-paypal-installment-banner="true"
data-swag-pay-pal-installment-banner-options="{{ installmentBanner|json_encode }}">
</div>
</div>
{% endif %}
{% endblock %}
{% endblock %}