<?php

namespace AutoAdmin\Bundle\Content\Entity\Duplicators;

use AutoAdmin\Bundle\Content\Model\LocaleInterface;

class LocaleEntityDuplicator extends AbstractDuplicator
{
    /**
     * @return string[]
     */
    public function support(): array
    {
        return [
            LocaleInterface::class
        ];
    }

    /**
     * @param LocaleInterface $entity
     * @param LocaleInterface $duplicate
     *
     * @return LocaleInterface
     */
    public function duplicate($entity, $duplicate, $parent = null)
    {
        $duplicate->setCode($entity->getCode());

        return $duplicate;
    }
}