<?php

declare(strict_types=1);

namespace External\HannahBundle\View\Seller;

class MapView extends \KupShop\SellerBundle\View\MapView
{
    public function getBodyVariables()
    {
        $vars = parent::getBodyVariables();

        $sellers = $vars['dealers'] ?? [];

        $vars['dealers'] = array_filter($sellers, fn ($x) => $x['type'] === 'h');
        $vars['online_dealers'] = array_filter($sellers, fn ($x) => $x['type'] === 'i');

        return $vars;
    }
}
