{% extends "shop/catalog/product-add2cart.html" %}
{% load i18n %}

{% block available-quantity-in-stock %}
<div class="d-flex flex-column">
	<span class="label">{% trans "Available" context "catalog" %}</span>
	<div class="lead mt-1" ng-cloak>
	{% verbatim %}{{ context.availability.quantity }}{% endverbatim %}
	</div>
</div>
{% endblock %}

{% block change-purchasing-quantity %}
<div class="d-flex flex-column w-25">
	<label for="quantity">{% trans "Quantity" context "catalog" %}</label>
	<div class="form-group" ng-show="context.availability.quantity">
		<input class="form-control" name="quantity" type="number" min="1" max="{% verbatim %}{{ context.availability.quantity }}{% endverbatim %}" ng-model="context.quantity" ng-model-options="{{ ADD2CART_NG_MODEL_OPTIONS }}" ng-change="updateContext()" />
	</div>
	<div class="lead mt-1" ng-hide="context.availability.quantity" ng-cloak>
		{% trans "Currently not available." context "catalog" %}
	</div>
</div>
{% endblock %}

{% block limited-availability %}
<div class="text-muted text-left pr-2" ng-show="context.availability.sell_short" ng-cloak>
	<small>{% trans "Deliverable from {{ context.availability.earliest|date:'d. MMM.' }} onwards." context "catalog" %}</small>
</div>
<div class="text-muted text-left pr-2" ng-show="context.availability.limited_offer" ng-cloak>
	<small>{% trans "Available no later than {{ context.availability.latest|date:'d. MMM. H:mm' }}." context "catalog" %}</small>
</div>
{% endblock %}
