<?php

declare(strict_types=1);

/*
 * This file is part of the Ferienpass package.
 *
 * (c) Richard Henkenjohann <richard@ferienpass.online>
 *
 * For more information visit the project website <https://ferienpass.online>
 * or the documentation under <https://docs.ferienpass.online>.
 */

namespace Ferienpass\AdminBundle\Form\Filter;

use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;

#[\Attribute(\Attribute::TARGET_CLASS)]
class AsSubFilter extends AutoconfigureTag
{
    public function __construct(
        string $key,
        ?string $section = null,
        int $priority = 0,
        array $views = [],
        ?Ttl $ttl = null,
    ) {
        parent::__construct('ferienpass_admin.sub_filter', [
            'key' => $key,
            'section' => $section,
            'priority' => $priority,
            'views' => $views,
            'ttl' => $ttl?->name,
        ]);
    }
}
