<?php

declare(strict_types=1);

namespace KupShop\PreordersBundle\Twig\Components\Preorders\PreorderDetail;

use KupShop\ComponentsBundle\Attributes\Component;
use KupShop\ComponentsBundle\Attributes\Version;
use KupShop\ComponentsBundle\Twig\BaseComponent;
use KupShop\ComponentsBundle\Twig\DataProvider\OrderDataTrait;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent(template: '@Preorders/components/PreorderDetail/Attachments/Attachments.1.html.twig')]
#[Component(1, [
    new Version(1, newJs: null),
])]
class Attachments extends BaseComponent
{
    use OrderDataTrait;

    public function exportUrl(): string
    {
        return path('kupshop_preorders_export_user', ['id_date' => $this->order->getId()], Router::ABSOLUTE_URL);
    }
}
