{% if html is null %}
    {{ include('@FerienpassAdmin/components/export/_preview_empty.html.twig') }}
{% else %}
    {# The print-sheet template ships its own (mPDF) CSS. Render it isolated in a
       shadow root so it cannot leak into — or be styled by — the admin chrome.
       The id is keyed to the preview signature so a Live Component morph drops
       and re-creates the host, re-running the shadow-root controller's connect()
       to adopt the freshly rendered <template>. #}
    <div id="pv-pdf-{{ signature }}" {{ stimulus_controller('ferienpass/admin-shadow-root') }} class="w-full">
        <template shadowrootmode="open">{{ html|raw }}</template>
    </div>
{% endif %}
