{% if product.enabledVariants.empty() or (product.simple and product.enabledVariants.first.isTracked and not (1 <= (product.enabledVariants.first.onHand - product.enabledVariants.first.onHold))) %}
{#{% include '@SyliusShop/Product/Show/_outOfStock.html.twig' %}#}
<div class="alert alert-primary" id="sylius-product-out-of-stock" {{ sylius_test_html_attribute('product-out-of-stock') }}>
{{ 'sylius.ui.out_of_stock'|trans }}
</div>
{% elseif product.simple and not product.enabledVariants.first.isTracked and 0 == product.enabledVariants.first.onHand %}
<div class="alert alert-primary" id="sylius-product-out-of-stock-long-term" {{ sylius_test_html_attribute('product-out-of-stock-long-term') }}>
{{ 'app.ui.out_of_stock_long_term'|trans }}
</div>
{% else %}
{{ render(url('sylius_shop_partial_cart_add_item', {'template': '@SyliusShop/Product/Show/_addToCart.html.twig', 'productId': product.id})) }}
{% endif %}