<?php

namespace AutoAdmin\Bundle\Content\Entity\Duplicators;

use AutoAdmin\Bundle\Content\Entity\Interfaces\MenuItemTranslationInterface;

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

    /**
     * @param MenuItemTranslationInterface $entity
     * @param MenuItemTranslationInterface $duplicate
     *
     * @return MenuItemTranslationInterface
     */
    public function duplicate($entity, $duplicate, $parent = null)
    {
        $duplicate->setLabel($entity->getLabel());

        return $duplicate;
    }
}
