<?php

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

use AutoAdmin\Bundle\Admin\Form\TypeGuesser\AbstractAdminTypeGuesser;
use AutoAdmin\Bundle\Admin\Form\Type\Component\DatePickerType;
use Doctrine\DBAL\Types\Types;

class DateGuesser extends AbstractAdminTypeGuesser
{
    public function getFormType(): string
    {
        return DatePickerType::class;
    }

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

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

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

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

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