protected function importCustomizeRule( $rootParagraphId,
                                            DOMElement $ruleNode,
                                            ZipArchive $zip,
                                            array $paragraphIdMap,
                                            array $domains,
                                            $dbSchema )
    {
        /* @var $mapper \Grid\Customize\Model\Rule\Mapper */
        $properties = array();
        $model      = $this->getSheetModel();
        $mapper     = $model->getMapper()->getRuleMapper();
        $media      = $ruleNode->getAttribute( 'media' ) ?: '';
        $selector   = $this->processCustomizeRuleSelector(
            $ruleNode->getAttribute( 'selector' ),
            $paragraphIdMap
        );

        foreach ( $ruleNode->childNodes as $child )
        {
            if ( $child instanceof DOMElement &&
                 $child->tagName === 'customize-property' )
            {
                $substitutions = array();

                foreach ( $child->childNodes as $substitutionNode )
                {
                    if ( $substitutionNode instanceof DOMElement &&
                         $substitutionNode->tagName === 'substitution' )
                    {
                        $name   = $substitutionNode->getAttribute( 'original' );
                        $value  = $substitutionNode->getAttribute( 'file' );
                        $substitutions[$name] = $value;
                    }
                }

                $value = $this->processValue(
                    $child->getAttribute( 'value' ),
                    $zip,
                    $substitutions,
                    $domains,
                    $dbSchema,
                    $paragraphIdMap
                );

                $properties[] = array(
                    'name'      => $child->getAttribute( 'name' ),
                    'value'     => $value,
                    'priority'  => $child->hasAttribute( 'priority' )
                                 ? $child->getAttribute( 'priority' )
                                 : null,
                );
            }
        }

        $rule = $mapper->create( array(
            'selector'          => $selector,
            'media'             => $media,
            'rawProperties'     => $properties,
            'rootParagraphId'   => $rootParagraphId,
        ) );

        return $rule->save();
    }