<?php

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

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

class DateTimeGuesser extends AbstractAdminTypeGuesser
{
    public function getFormType(): string
    {
        return DateTimePickerType::class;
    }

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

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

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

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

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