<?php

/*
 * This file is part of the VITICORE2 package.
 *
 * (c) CP Creation <web@cpcreation.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CpCreation\VitiCore\Bridge\Symfony\Bundle\Twig\Components\Shop;

use CpCreation\VitiCore\Product\Model\ProductCategory;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent('shop:Tabs', template: '@components/shop/Tabs.html.twig')]
final class Tabs
{
    /**
     * @var ProductCategory[]
     */
    public array $categories = [];

    public string $activeSlug = '';

    public string $route = 'shop';

    public string $routeParam = 'slug';

    public string $frame = 'shop-content';

    /**
     * @return array<string, string|null>
     */
    public function getRouteParameters(ProductCategory $category): array
    {
        return [
            $this->routeParam => $category->getSlug(),
        ];
    }
}
