{% if not file.htmlPreviewFile is empty %}
    {{ file.htmlPreviewFile|raw }}
{% else %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{ mesh.label }} / {{ file.name }}</title>
    {{ encore_entry_link_tags('viewer') }}
</head>
<body>

<div id="mesh-viewer" data-file="{{ path('mesh_download', {stlMesh: mesh.id, key: key, _domain: _domain}) }}"></div>

<script src="{{ asset('stl_viewer/stl_viewer.min.js') }}"></script>
{{ encore_entry_script_tags('viewer') }}

</body>
</html>
{% endif %}
