{encore_entry_script_tags entry='last_visited_products'}

{$params = []}
{if $listType}{$params['listType'] = $listType}{/if}
{if $listId}{$params['listId'] = $listId}{/if}

<script>
   wpj.onReady.push(function () {
      var placeholder = document.querySelector('.last-visited-products-placeholder');
      if (placeholder) {
         wpj.lastVisitedProducts.initLazy(placeholder, {$body.product.id|default:'null'}, {$params|@json_encode nofilter});
      }
   });
</script>

<div class="last-visited-products-placeholder"></div>
