{* @compiler:inline-only *}
<div class="product-description">
   <div class="tabs">
      <div class="tabs-nav tabs-nav-product">
         {if $descr_exists}
            <a href="" data-tab-target=".tab-descr" class="{$header_class} active">{t}Popis produktu{/t}</a>
         {/if}

         {if $body.model.id_richcontent}
            <a href="" data-tab-target=".tab-brand-page" class="{$header_class} {if !$descr_exists}active{/if}">{t}Objevte více{/t}</a>
         {/if}

         <a href="#gpsr-tab" data-tab-target="#gpsr-tab"
            {if empty($body.product.param[$body.gpsrParamID]['values']) && !$body.product.sup_name && !$body.product.sup_addr && !$body.product.sup_contact}style="display:none;"{/if}
            class="{$header_class}">{t}Ostatní informace{/t}</a>
      </div>

      <div class="tabs-content">
         <div class="tab-descr active">
            <div data-text="variation-description" class="variation-description">
               {$body.product.longDescr|default:$body.model.descr|default:$body.serie.descr|markdown2html nofilter}
            </div>

            {if $body.product.video_url}
               <div class="product-video">
                  {$var = []}
                  {$d = preg_match('/.*v=([A-Za-z0-9_]*)/', $body.product.video_url, $var)}
                  {if !$var[1]}{$var[1] = $body.product.video_url|replace:'https://youtu.be/':''|replace:'https://youtube.com/shorts/':''}{/if}

                  <iframe id="player" frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="YouTube video player"
                          src="https://www.youtube.com/embed/{$var[1]}" loading="lazy" width="560" height="315"></iframe>
               </div>
            {/if}
         </div>

         {if $body.model.id_richcontent}
            <div class="tab-brand-page product-brand-page {if !$descr_exists}active{/if}">
               {if $descr_exists}
                  <a href="/richcontent/{$body.model.id_richcontent}/" data-ondemand>{t}Načíst{/t}</a>
                  <div data-reload="richcontent"></div>
               {else}
                  {insert_richcontent id=$body.model.id_richcontent}
               {/if}
            </div>
         {/if}

        <div class="tab-gpsr" id="gpsr-tab" data-tabs="gpsr-tab" data-html="gpsr-tab-content">
           {gpsr_tab_content product=$body.product}
        </div>
      </div>
   </div>
</div>
