public function parseSubpalettes(array $subpalettes, array $selectorFieldNames = [])
    {
        $properties = [];
        foreach ($subpalettes as $subPaletteSelector => $childFields) {
            // Child fields list must be a string.
            if (!\is_string($childFields)) {
                continue;
            }

            $selectorFieldName = $this->createSubpaletteSelectorFieldName($subPaletteSelector, $selectorFieldNames);

            $selectorProperty = [];
            // For selectable sub selector.
            if (isset($properties[$selectorFieldName])
                && (0 < \substr_count($subPaletteSelector, '_'))
            ) {
                $selectorProperty = $properties[$selectorFieldName];
            }

            $properties[$selectorFieldName] = $this->parseSubpalette(
                $subPaletteSelector,
                $childFields,
                $selectorFieldNames,
                $selectorProperty
            );
        }

        return $properties;
    }