{% extends "base.html" %} {% import "macros/ui.html" as ui %} {% block title %}{{ product.name }}{% endblock title %} {% block content %}
{% if images | length > 0 %} {% for image in images %} {{ product.name }} {% endfor %} {% endif %}
{% if images | length > 1 %}
{% for image in images %} {% endfor %}
{% endif %}
{% if category %} {{ category.name }} {% endif %}

{{ product.name }}

{{ product.price }} {{ product.currency }}

{% if product.description %}
{{ product.description }}
{% endif %} {% if product.stock > 0 %}
{{ ui::input(name="quantity", id="quantity", type="number", value="1", width="w-24", attrs='min="1" max="' ~ product.stock ~ '"') }}
{{ ui::button(label=t(key="add-to-cart", lang=lang | default(value='sk')), type="submit", size="px-5 py-2 text-sm") }}

{{ t(key="in-stock", lang=lang | default(value='sk')) }}: {{ product.stock }}

{% else %}

{{ t(key="out-of-stock", lang=lang | default(value='sk')) }}

{% endif %}
{% endblock content %}