<?php


namespace AutoAdmin\Bundle\Seo\Form;


use AutoAdmin\Bundle\Admin\Form\Type\Component\RichSelect;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;

class RedirectCodeType extends AbstractType
{
    public function getParent(): string
    {
        return RichSelect::class;
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);
        $resolver->setDefaults([
            'placeholder' => false,
            'choices' => [
                'seo.redirect_type.label.temporary' => 302,
                'seo.redirect_type.label.permanent' => 301,
            ],
        ]);
    }
}
