private function processViewTypeConfig(BlockDefinitionInterface $blockDefinition): void
    {
        $blockDefinitionParameters = array_keys($blockDefinition->getParameterDefinitions());

        foreach ($blockDefinition->getViewTypes() as $viewType) {
            $this->viewTypes[$viewType->getIdentifier()] = $viewType->getName();

            foreach ($viewType->getItemViewTypes() as $itemViewType) {
                $this->itemViewTypes[$viewType->getIdentifier()][$itemViewType->getIdentifier()] = $itemViewType->getName();
                $this->viewTypesByItemViewType[$itemViewType->getIdentifier()][] = $viewType->getIdentifier();
            }

            $includedParameters = [];
            $excludedParameters = [];

            $validParameters = $viewType->getValidParameters();
            if (!is_array($validParameters)) {
                $includedParameters = $blockDefinitionParameters;
            } elseif (count($validParameters) > 0) {
                foreach ($validParameters as $validParameter) {
                    mb_strpos($validParameter, '!') === 0 ?
                        $excludedParameters[] = mb_substr($validParameter, 1) :
                        $includedParameters[] = $validParameter;

                    if (count($includedParameters) === 0) {
                        $includedParameters = $blockDefinitionParameters;
                    }
                }
            }

            foreach ($includedParameters as $includedParameter) {
                if (!in_array($includedParameter, $excludedParameters, true)) {
                    $this->viewTypesByParameters[$includedParameter][] = $viewType->getIdentifier();
                }
            }
        }
    }