<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Content\Model\StatePublishableInterface;

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

    /**
     * @param StatePublishableInterface $entity
     * @param StatePublishableInterface $duplicate
     *
     * @return StatePublishableInterface
     */
    public function duplicate(object $entity, object $duplicate): object
    {
        $duplicate->setState($entity->getState());

        return $duplicate;
    }
}
