<?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\TextareaType;

class TextareaGuesser extends AbstractAdminTypeGuesser
{
    public function getFormType(): string
    {
        return TextareaType::class;
    }

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

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

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

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

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