{$style = $instance->getProperty('listStyle')}
{if $isPreview}
  <div class="opc-ProductStream{if $portlet->showLicenceAlert()} alert alert-danger" role="alert{/if}"
    style="{$instance->getStyleString()}">
    {if $portlet->showLicenceAlert()}
      <p>{$portlet->showLicenceInfo()}</p>
      {assign var=dHintLink value="<a href='{$portlet->cinUrl()}'>{$portlet->cinUrlText()}</a>"}
      {assign var=hintText value=__("po_visit_cin")}
      {$dHint = sprintf($hintText, $dHintLink)}
      <p>{$dHint}</p>
    {else}
      {image class="img-responsive" alt='ProductStream' src=$portlet->getBaseUrl()|cat:'preview.'|cat:$style|cat:'.png'}
    {/if}
  </div>
{else}
  {$productlist = $portlet->getFilteredProducts($instance)}

  {if $style === 'list' || $style === 'gallery'}
    {if $style === 'list'}
      {$grid = '12'}
      {$eqHeightClasses = ''}
    {else}
      {$grid   = '6'}
      {$gridmd = '4'}
      {$gridxl = '3'}
      {$eqHeightClasses = 'row-eq-height row-eq-img-height'}
    {/if}
    {if $inContainer === false}<div class="container-fluid">{/if}
      {assign var=rowClasses value="{$style|cat:' '|cat:$eqHeightClasses|cat:' product-list opc-ProductStream opc-ProductStream-'|cat:$style|cat:' '|cat:$instance->getStyleClasses()}"}
      {row class=$rowClasses itemprop="mainEntity" itemscope=true itemtype="https://schema.org/ItemList" style="{$instance->getStyleString()}"}
      {foreach $productlist as $Artikel}
        {col cols={$grid} md="{if isset($gridmd)}{$gridmd}{/if}" xl="{if isset($gridxl)}{$gridxl}{/if}"
        class="product-wrapper {if !($style === 'list' && $Artikel@last)}mb-4{/if}"
        itemprop="itemListElement" itemscope=true itemtype="https://schema.org/Product"}
        {if $style === 'list'}
          {include file='productlist/item_list.tpl' tplscope=$style isOPC=true}
        {elseif $style === 'gallery'}
          {include file='productlist/item_box.tpl' tplscope=$style class='thumbnail'}
        {/if}
        {/col}
      {/foreach}
      {/row}
      {if $inContainer === false}
    </div>{/if}
  {elseif $style === 'simpleSlider'}
    <div id="{$instance->getUid()}"
      class="carousel carousel-arrows-inside evo-slider slick-lazy opc-ProductStream opc-ProductStream-{$style} slick-type-product"
      data-slick-type="product-slider" style="{$instance->getStyleString()}">
      {foreach $productlist as $Artikel}
        <div class="product-wrapper">
          <a href="{$Artikel->getURL()}">
            <div class="square square-image">
              <div class="inner">
                <img src="{$Artikel->Bilder[0]->cURLNormal}" alt="{$Artikel->cName}" title="{$Artikel->cName}">
              </div>
            </div>
          </a>
        </div>
      {/foreach}
    </div>
  {elseif $style === 'slider'}
    {if $inContainer === false}
      <div class="container-fluid">
      {/if}
      <div class="opc-product-slider" style="{$instance->getStyleString()}">
        {include file='snippets/product_slider.tpl' productlist=$productlist isOPC=true}
      </div>
      {if $inContainer === false}
      </div>
    {/if}
  {elseif $style === 'box-slider'}
    <div class="opc-product-slider" style="{$instance->getStyleString()}">
      {include file="snippets/product_slider.tpl" productlist=$productlist tplscope='box' isOPC=true}
    </div>
  {/if}
{/if}
