<?php

namespace KupShop\ComponentsBundle\Twig\Components\Section\Filter\Sorting;

use KupShop\ComponentsBundle\Attributes\Component;
use KupShop\ComponentsBundle\Attributes\Version;
use KupShop\ComponentsBundle\Twig\Components\Section\Filter\Sorting;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;

#[AsTwigComponent(template: '@Components/components/Section/Filter/Sorting/Popup/Popup.1.html.twig')]
#[Component(1, [
    new Version(1),
])]
class Popup extends Sorting
{
    public function chosenSortTitle(): ?string
    {
        return $this->sortChoices()[$this->chosenSort()] ?? null;
    }
}
