<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Content\Model\SiteEntityInterface;

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

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

        return $duplicate;
    }
}
