<?php

namespace AutoAdmin\Bundle\Content\Duplicator;

use AutoAdmin\Bundle\Content\Breadcrumbs\Model\BreadcrumbsConfigInterface;

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

    /**
     * @param BreadcrumbsConfigInterface $entity
     * @param BreadcrumbsConfigInterface $duplicate
     *
     * @return BreadcrumbsConfigInterface
     */
    public function duplicate(object $entity, object $duplicate): object
    {
        $duplicate->setHiddenBreadcrumbs($entity->isHiddenBreadcrumbs());

        return $duplicate;
    }
}
