private function getEnabledItemTypes(array $itemTypes): array
    {
        $allItemTypes = array_flip(
            array_map(
                static function (Configuration $config): string {
                    return $config->getItemName();
                },
                $this->configRegistry->getConfigs()
            )
        );

        if (count($itemTypes) === 0) {
            return $allItemTypes;
        }

        return array_filter(
            $allItemTypes,
            static function (string $itemType) use ($itemTypes): bool {
                return in_array($itemType, $itemTypes, true);
            }
        );
    }