<?php

namespace AutoAdmin\Bundle\Admin\Form\TypeGuesser\Guesser;

use AutoAdmin\Bundle\Admin\Form\TypeGuesser\AbstractAdminTypeGuesser;
use Doctrine\DBAL\Types\Types;
use Symfony\Component\Form\Extension\Core\Type\NumberType;

class FloatGuesser extends AbstractAdminTypeGuesser
{
    public function getFormType(): string
    {
        return NumberType::class;
    }

    public function getDefaultFormTypeOptions(): array
    {
        return [];
    }

    public function getMatchingConfigStrings(): array
    {
        return [
            'float',
        ];
    }

    public function getMatchingAttributes(): array
    {
        return [
            Types::FLOAT,
            Types::DECIMAL,
        ];
    }

    public function getMatchingPropertyTypes(): array
    {
        return [
            'float',
        ];
    }

    public function priority(): int
    {
        return 10;
    }
}
