<?php

namespace Staatic\Vendor\Symfony\Component\DependencyInjection\Argument;

class TaggedIteratorArgument extends IteratorArgument
{
    /**
     * @var string
     */
    private $tag;
    /**
     * @var mixed
     */
    private $indexAttribute;
    /**
     * @var string|null
     */
    private $defaultIndexMethod;
    /**
     * @var string|null
     */
    private $defaultPriorityMethod;
    /**
     * @var bool
     */
    private $needsIndexes;
    /**
     * @var mixed[]
     */
    private $exclude;
    public function __construct(string $tag, string $indexAttribute = null, string $defaultIndexMethod = null, bool $needsIndexes = \false, string $defaultPriorityMethod = null, array $exclude = [])
    {
        parent::__construct([]);
        if (null === $indexAttribute && $needsIndexes) {
            $indexAttribute = preg_match('/[^.]++$/', $tag, $m) ? $m[0] : $tag;
        }
        $this->tag = $tag;
        $this->indexAttribute = $indexAttribute;
        $this->defaultIndexMethod = $defaultIndexMethod ?: ($indexAttribute ? 'getDefault' . str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))) . 'Name' : null);
        $this->needsIndexes = $needsIndexes;
        $this->defaultPriorityMethod = $defaultPriorityMethod ?: ($indexAttribute ? 'getDefault' . str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $indexAttribute))) . 'Priority' : null);
        $this->exclude = $exclude;
    }
    public function getTag()
    {
        return $this->tag;
    }
    public function getIndexAttribute(): ?string
    {
        return $this->indexAttribute;
    }
    public function getDefaultIndexMethod(): ?string
    {
        return $this->defaultIndexMethod;
    }
    public function needsIndexes(): bool
    {
        return $this->needsIndexes;
    }
    public function getDefaultPriorityMethod(): ?string
    {
        return $this->defaultPriorityMethod;
    }
    public function getExclude(): array
    {
        return $this->exclude;
    }
}
