private function applyAction(array &$action, array &$deepCopyList, ModelInterface $parentModel = null)
    {
        /** @var ModelInterface|null $model */
        $model = $action['model'];
        /** @var ItemInterface $item */
        $item = $action['item'];

        if ($item->isCreate()) {
            // create new model
            $model = $this->createEmptyModelWithDefaults();
        } elseif ($item->isCopy() || $isDeepCopy = $item->isDeepCopy()) {
            // copy model
            $model       = $this->modelCollector->getModel(ModelId::fromModel($model));
            $clonedModel = $this->doCloneAction($model);

            if (isset($isDeepCopy) && $isDeepCopy) {
                $deepCopyList[] = [
                    'origin' => $model,
                    'model'  => $clonedModel,
                ];
            }

            $model = $clonedModel;
        }

        if (!$model) {
            throw new \UnexpectedValueException(
                'Invalid clipboard action entry, no model created. ' . $item->getAction()
            );
        }

        if ($parentModel) {
            $this->relationshipManager->setParent($model, $parentModel);
        }

        $action['model'] = $model;
    }