<?php

namespace KupShop\ArticlesBundle\GTM\PageViews;

use KupShop\ArticlesBundle\Twig\Components\Articles\View;
use KupShop\ComponentsBundle\Interfaces\GTMComponentInterface;
use KupShop\ComponentsBundle\Twig\BaseComponent;
use KupShop\GTMBundle\PageType\ArticlesViewType;

class Articles extends ArticlesViewType implements GTMComponentInterface
{
    /** @param View $component */
    public function getPushData($component): object
    {
        return (object) [
            'articles' => [
                'artPath' => $this->getBreadcrumbsWithoutCurrent(),
            ],
        ];
    }

    public function getPageTypeString(BaseComponent $component): ?string
    {
        return 'blog';
    }
}
