<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Content\Model\SequencedInterface;

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

    /**
     * @param SequencedInterface $entity
     * @param SequencedInterface $duplicate
     *
     * @return SequencedInterface
     */
    public function duplicate(object $entity, object $duplicate): object
    {
        $duplicate->setSequence($entity->getSequence());

        return $duplicate;
    }
}
