<?php declare(strict_types=1);

namespace Newland\NeosFiltering\Factory\Override;

use Newland\Contracts\Neos\Filter\FilterItem;
use Newland\NeosFiltering\Factory\OverrideBehaviour;
use Newland\NeosFiltering\Items\ObstructionWrapper;

class Hide implements OverrideBehaviour
{
    public function applyOverride(FilterItem $item, $override, array $configuration): FilterItem
    {
        $item->setState($override);
        return new ObstructionWrapper($item);
    }
}
