private static function getMatching(array &$item, string $itemUuid, callable $callable = null, array &$collection)
    {
        // Return true if this item is the one we are looking for.
        if (isset($item['uuid']) && $item['uuid'] === $itemUuid) {
            if ($callable) {
                $callable($item, $collection);
            }

            return $item;
        }

        // Look in child items.
        if (isset($item['items']) && \is_array($item['items'])) {
            foreach ($item['items'] as &$subItem) {
                if ($c = self::getMatching($subItem, $itemUuid, $callable, $item['items'])) {
                    return $c;
                }
            }
        }

        return false;
    }