<?php

namespace AutoAdmin\Bundle\Content\Entity\Duplicators;

use AutoAdmin\Bundle\Content\Model\SiteEntityInterface;

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

    /**
     * @param SiteEntityInterface $entity
     * @param SiteEntityInterface $duplicate
     *
     * @return SiteEntityInterface
     */
    public function duplicate($entity, $duplicate, $parent = null)
    {
        $duplicate->setEnabled($entity->getEnabled());

        return $duplicate;
    }
}