<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

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

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

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

        return $duplicate;
    }
}
