{$dealer = $body.dealer}

<a href="" data-close-seller-box class="close close-{$dealer.type}"><i class="fc icons_plus"></i></a>
{if $dealer.photos|count>1}
{foreach $dealer.photos|array_slice:0:1 as $photo}
   <img src="{get_photo photo=$photo size='product_large'}" class="logo img-responsive">
{/foreach}
{/if}

{if $dealer.photos|count > 1}
   <div class="row sellers-photo">
      {foreach $dealer.photos|array_slice:1:4 as $photo}
         <div class="col-xxs-4">
            {$photo_dimensions = $cfg.Photo.types["product_cart"].size}
            <img src="{get_photo photo=$photo size='product_cart'}" class="img-fluid" width="{$photo_dimensions[0]}"
                 height="{$photo_dimensions[1]}">
         </div>
      {/foreach}
   </div>
{/if}

<h5>{$dealer.title}</h5>

<p>{$dealer.address nofilter}</p>

{if $dealer.descr}
   {$dealer.descr nofilter}
{/if}

{if $dealer.data.opening_hours}
   <p class="title-default">{t}Otevírací doba{/t}</p>
   <table>
      {$days = [1 => "{t}Pondělí{/t}", 2 => "{t}Úterý{/t}", 3 => "{t}Středa{/t}", 4 => "{t}Čtvrtek{/t}", 5 => "{t}Pátek{/t}", 6 => "{t}Sobota{/t}", 7 => "{t}Neděle{/t}"]}
      {foreach $dealer.data.opening_hours as $day => $hours}
         {$from = $hours[0]}
         {$to = $hours[1]}
         <tr>
            <td>{$days[$day]}</td>
            <td>{if empty($from) || empty($to)}{t}zavřeno{/t}{else}{$from} - {$to}{/if}</td>
         </tr>
      {/foreach}
   </table>
{/if}

{if $dealer.phone or $dealer.email or $dealer.web}
   <p class="title-default">{t}Kontakt{/t}</p>
   <p class="contacts">
      <a href="tel:{$dealer.phone|strip:''}">{$dealer.phone}</a>
      <a href="mailto:{$dealer.email}">{$dealer.email}</a>
      <a href="{if !$dealer.web|strstr:'http'}https://{/if}{$dealer.web}" target="_blank">{$dealer.web}</a>
   </p>
{/if}

<a href="{path('shop_seller_seller_detail', ['id_seller' => $dealer.id])}" class="btn btn-secondary btn-block">{t}Detail prodejny{/t}</a>
