<?php

declare(strict_types=1);

/*
 * Chill is a software for social workers
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace Chill\PersonBundle\PersonIdentifier;

use Chill\PersonBundle\Entity\Identifier\PersonIdentifier;
use Chill\PersonBundle\Entity\Identifier\PersonIdentifierDefinition;
use Symfony\Component\Form\FormBuilderInterface;

interface PersonIdentifierEngineInterface
{
    public static function getName(): string;

    public function canonicalizeValue(array $value, PersonIdentifierDefinition $definition): ?string;

    public function buildForm(FormBuilderInterface $builder, PersonIdentifierDefinition $personIdentifierDefinition): void;

    public function renderAsString(?PersonIdentifier $identifier, PersonIdentifierDefinition $definition): string;
}
