{% set com_props = props %}
{%- set class_name = [
"f-filtration",
props.variant in ["inline"] ? "--" ~ props.variant : "--default",
]|join(' ')|trim -%}
{%- set attrs = [
'class="' ~ class_name ~ '"',
] -%}
{%- set attrs = attrs|join(' ')|trim -%}
{% set is_inline = props.variant == "inline" ?? false %}
<div {{ attrs|raw }}>
<header class="f-filtration__header u-posr d-flex align-items-center justify-content-between flex-column flex-sm-row gap-1 py-1 px-2">
<div class="f-filtration__title u-color-primary u-fz-lg u-fw-500">{{ "Filtrovat položky"|trans }}</div>
{% if is_inline %}
{% include "@Components/icon/icon.twig" with {props: {
src: "@Images/svg/filter.svg",
size: "lg",
color: "primary",
stroke_off: true,
extra_class: "f-filtration__icon"
}} %}
{% else %}
{% include "@Components/button/button.twig" with {props: {
tag: "button",
type: "button",
variant: "outline",
size: "sm",
title: "Otevřít filtraci"|trans,
icon: {
src: "@Images/svg/filter.svg"
},
data: {
"close-title": "Zavřít filtraci"|trans,
},
full_width_mobile: true,
extra_class: "--js-open-filter"
}} %}
{% endif %}
</header>
<div class="f-filtration__body">
{% include "@Components/forms/filtration-form/filtration-form--raw.twig" with {props: props} %}
</div>
</div>