<?php

namespace AutoAdmin\Bundle\BrickBuilder\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;

class MargeType extends AbstractType
{
    public function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);

        $resolver->setDefault('placeholder', 'auto');
        $resolver->setDefault('empty_value', null);
        $resolver->setDefault('choices', self::getChoices());
    }

    public static function getChoices(): array
    {
        return [
            'Aucune' => 0,
            'Très petite' => 1,
            'Petite' => 2,
            'Moyenne' => 3,
            'Grande' => 4,
            'Très grande' => 5,
        ];
    }

    public function getParent(): string
    {
        return ChoiceType::class;
    }
}
