<?php

namespace AutoAdmin\Bundle\Content\Entity\Duplicators;

use AutoAdmin\Bundle\Seo\Model\SeoContentTranslationInterface;

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

    /**
     * @param SeoContentTranslationInterface $entity
     * @param SeoContentTranslationInterface $duplicate
     *
     * @return SeoContentTranslationInterface
     */
    public function duplicate($entity, $duplicate, $parent = null)
    {
        $duplicate->setSeoMetadata($entity->getSeoMetadata());

        return $duplicate;
    }
}