{* themes/deinTheme/templates/safety_warnings.tpl *}

{if $shopArticle->warnings && $shopArticle->warnings|@count > 0}
    <div class="sicherheitshinweise">
        <h2>Sicherheitshinweise</h2>
        <table style="width: 100%; border-spacing: 10px;">
            {foreach from=$shopArticle->warnings item=warning}
                <tr>
                    <td style="width: 20%; vertical-align: top; text-align: center;">
                        {if $warning.image_filename}
                            <picture>
                                <source srcset="{$THEME_DIR}/media/images/safety/{$warning.image_filename|escape}" type="image/svg+xml">
                                <img src="{$THEME_DIR}/media/images/safety/{$warning.image_filename|replace:'.svg':'.png'|escape}" 
                                    alt="Bild: {$warning.name|escape}" 
                                    style="max-width: 50px; height: auto;">
                            </picture>
                        {/if}
                    </td>
                    <td style="width: 80%; vertical-align: top;">
                        <strong>{$warning.name|escape}</strong><br>
                        <span>{$warning.beschreibung|escape|nl2br}</span>
                    </td>
                </tr>
            {/foreach}
        </table>
    </div>
{else}
    <p>Keine Sicherheitshinweise verfügbar.</p>
{/if}



