<?php

namespace KupShop\ComponentsBundle\Twig\Components\Product;

use KupShop\ComponentsBundle\Attributes\Component;
use KupShop\ComponentsBundle\Attributes\Version;
use KupShop\ComponentsBundle\Twig\BaseComponent;
use KupShop\ComponentsBundle\Twig\DataProvider\ProductDataTrait;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent(template: '@Components/components/Product/Title/Title.1.html.twig')]
#[Component(1, [
    new Version(1, newJs: null),
])]
class Title extends BaseComponent
{
    use ProductDataTrait;

    public function getTitle(): string
    {
        return $this->provider->getTitle($this->product->id);
    }
}
