<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Seo\Model\OpenGraphContentTranslationInterface;

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

    /**
     * @param OpenGraphContentTranslationInterface $entity
     * @param OpenGraphContentTranslationInterface $duplicate
     *
     * @return OpenGraphContentTranslationInterface
     */
    public function duplicate(object $entity, object $duplicate): object
    {
        $duplicate->setOpenGraphMetadata($entity->getOpenGraphMetadata());

        return $duplicate;
    }
}
