public function getBlockTypes(bool $onlyEnabled = false): array
    {
        if (!$onlyEnabled) {
            return $this->blockTypes;
        }

        return array_values(
            array_filter(
                $this->blockTypes,
                static function (BlockType $blockType): bool {
                    return $blockType->isEnabled();
                }
            )
        );
    }