{# Atomic templates should be as "dumb" as possible. #}

{% set variant = variant ? 'cards--' ~ variant : 'cards--default' %}
{% set card_variant = card_variant ? 'card--' ~ card_variant : 'card--default' %}

{% set styles = card_width ? '--grid-min-width: ' ~ card_width ~ ';' : '--grid-min-width: 30ch;' %}

{% set classes = [
  'cards',
  'grid',
  variant,
  card_variant,
] %}

<div class="{{ classes|join(' ') }}" style="{{ styles|join }}">
  {% for item in items %}
    {% include "@molecules/Card/Card.twig" with item %}
  {% endfor %}
</div>
