public function mapCondition(PersistenceCondition $condition): Condition
    {
        try {
            $conditionType = $this->conditionTypeRegistry->getConditionType(
                $condition->type
            );
        } catch (ConditionTypeException $e) {
            $conditionType = new NullConditionType();
        }

        $conditionData = [
            'id' => $condition->id,
            'status' => $condition->status,
            'ruleId' => $condition->ruleId,
            'conditionType' => $conditionType,
            'value' => $condition->value,
        ];

        return Condition::fromArray($conditionData);
    }