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

class BooleanGuesser extends AbstractAdminTypeGuesser
{
    public function getFormType(): string
    {
        return CheckboxType::class;
    }

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

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

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

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

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