/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { computed, makeObservable, observable, override } from 'mobx';
import { MappingIncludeMapping } from '../../../graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.js';
import { DEPRECATED__ExpectedOutputMappingTestAssert, DEPRECATED__ObjectInputData, DEPRECATED__FlatDataInputData, DEPRECATED__RelationalInputData, } from '../../../graph/metamodel/pure/packageableElements/mapping/DEPRECATED__MappingTest.js';
import { EngineRuntime, LakehouseRuntime, RuntimePointer, } from '../../../graph/metamodel/pure/packageableElements/runtime/Runtime.js';
import { observe_Abstract_PackageableElement, observe_PackageableElementReference, skipObserved, skipObservedWithContext, } from './CoreObserverHelper.js';
import { observe_ConcreteFunctionDefinition, observe_EnumValueReference, observe_GenericTypeReference, observe_PropertyReference, } from './DomainObserverHelper.js';
import { observe_RawLambda } from './RawValueSpecificationObserver.js';
import { observe_EmbeddedFlatDataPropertyMapping, observe_FlatDataAssociationPropertyMapping, observe_FlatDataConnection, observe_FlatDataInputData, observe_FlatDataInstanceSetImplementation, observe_FlatDataPropertyMapping, } from './STO_FlatData_ObserverHelper.js';
import { observe_EmbeddedRelationalInstanceSetImplementation, observe_InlineEmbeddedRelationalInstanceSetImplementation, observe_OtherwiseEmbeddedRelationalInstanceSetImplementation, observe_RelationalDatabaseConnection, observe_RelationalInputData, observe_RelationalInstanceSetImplementation, observe_RelationalPropertyMapping, observe_RootRelationalInstanceSetImplementation, } from './STO_Relational_ObserverHelper.js';
import { observe_AtomicTest, observe_TestAssertion, observe_TestSuite, } from './Testable_ObserverHelper.js';
import { observe_EmbeddedData } from './DSL_Data_ObserverHelper.js';
import {} from '../../../graph/metamodel/pure/packageableElements/relation/RelationType.js';
import { observe_BindingTransformer } from './DSL_ExternalFormat_ObserverHelper.js';
// ------------------------------------- Store -------------------------------------
export const observe_Abstract_Store = (metamodel) => {
    observe_Abstract_PackageableElement(metamodel);
    makeObservable(metamodel, {
        includes: observable,
    });
    metamodel.includes.forEach(observe_PackageableElementReference);
};
export const observe_INTERNAL__UnknownStore = skipObserved((metamodel) => {
    observe_Abstract_PackageableElement(metamodel);
    makeObservable(metamodel, {
        content: observable.ref,
    });
    return metamodel;
});
// ------------------------------------- TestSuite -----------------------------------
export const observe_MappingStoreTestData = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        store: observable,
        data: observable,
        hashCode: computed,
    });
    observe_EmbeddedData(metamodel.data, context);
    return metamodel;
});
export const observe_MappingTest = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        id: observable,
        assertions: observable,
        doc: observable,
        storeTestData: observable,
        hashCode: computed,
    });
    metamodel.assertions.forEach(observe_TestAssertion);
    metamodel.storeTestData.forEach((testData) => observe_MappingStoreTestData(testData, context));
    return metamodel;
});
export const observe_MappingTestSuite = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        id: observable,
        tests: observable,
        func: observable,
        hashCode: computed,
    });
    metamodel.tests.forEach((test) => observe_AtomicTest(test, context));
    observe_RawLambda(metamodel.func);
    return metamodel;
});
// ------------------------------------- Mapping -------------------------------------
export const observe_EnumerationMappingReference = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        value: observable,
        valueForSerialization: computed,
    });
    observe_PackageableElementReference(metamodel.ownerReference);
    return metamodel;
});
export const observe_RelationColumn = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        name: observable,
        genericType: observable,
        hashCode: computed,
    });
    // FIXME
    observe_GenericTypeReference(metamodel.genericType);
    return metamodel;
});
export const observe_SetImplementationReference = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        value: observable,
    });
    observe_PackageableElementReference(metamodel.ownerReference);
    return metamodel;
});
export const observe_LocalMappingPropertyInfo = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        localMappingProperty: observable,
        localMappingPropertyType: observable,
        localMappingPropertyMultiplicity: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.localMappingPropertyType);
    return metamodel;
});
export const observe_Abstract_PropertyMapping = (metamodel, context) => {
    makeObservable(metamodel, {
        sourceSetImplementation: observable,
        targetSetImplementation: observable,
    });
    observe_PropertyReference(metamodel.property);
    observe_SetImplementationReference(metamodel.sourceSetImplementation);
    if (metamodel.targetSetImplementation) {
        observe_SetImplementationReference(metamodel.targetSetImplementation);
    }
    if (metamodel.localMappingProperty) {
        observe_LocalMappingPropertyInfo(metamodel.localMappingProperty);
    }
};
export const observe_PurePropertyMapping = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_PropertyMapping(metamodel, context);
    makeObservable(metamodel, {
        transformer: observable,
        transform: observable,
        explodeProperty: observable,
        hashCode: computed,
    });
    if (metamodel.transformer) {
        observe_EnumerationMappingReference(metamodel.transformer);
    }
    observe_RawLambda(metamodel.transform);
    return metamodel;
});
export const observe_RelationFunctionPropertyMapping = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_PropertyMapping(metamodel, context);
    makeObservable(metamodel, {
        column: observable,
        bindingTransformer: observable,
        hashCode: computed,
    });
    observe_RelationColumn(metamodel.column);
    if (metamodel.bindingTransformer) {
        observe_BindingTransformer(metamodel.bindingTransformer);
    }
    return metamodel;
});
const observe_INTERNAL__UnknownPropertyMapping = skipObserved((metamodel) => makeObservable(metamodel, {
    content: observable.ref,
}));
class PropertyMappingObserver {
    observerContext;
    constructor(observerContext) {
        this.observerContext = observerContext;
    }
    visit_PropertyMapping(propertyMapping) {
        const extraPropertyMappingObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraPropertyMappingObservers?.() ?? []);
        for (const observer of extraPropertyMappingObservers) {
            const observedPropertyMapping = observer(propertyMapping, this.observerContext);
            if (observedPropertyMapping) {
                return;
            }
        }
    }
    visit_INTERNAL__UnknownPropertyMapping(propertyMapping) {
        observe_INTERNAL__UnknownPropertyMapping(propertyMapping);
    }
    visit_PurePropertyMapping(propertyMapping) {
        observe_PurePropertyMapping(propertyMapping, this.observerContext);
    }
    visit_FlatDataPropertyMapping(propertyMapping) {
        observe_FlatDataPropertyMapping(propertyMapping, this.observerContext);
    }
    visit_EmbeddedFlatDataPropertyMapping(propertyMapping) {
        observe_EmbeddedFlatDataPropertyMapping(propertyMapping, this.observerContext);
    }
    visit_RelationalPropertyMapping(propertyMapping) {
        observe_RelationalPropertyMapping(propertyMapping, this.observerContext);
    }
    visit_FlatDataAssociationPropertyMapping(propertyMapping) {
        observe_FlatDataAssociationPropertyMapping(propertyMapping, this.observerContext);
    }
    visit_EmbeddedRelationalPropertyMapping(propertyMapping) {
        observe_EmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);
    }
    visit_InlineEmbeddedRelationalPropertyMapping(propertyMapping) {
        observe_InlineEmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);
    }
    visit_OtherwiseEmbeddedRelationalPropertyMapping(propertyMapping) {
        observe_OtherwiseEmbeddedRelationalInstanceSetImplementation(propertyMapping, this.observerContext);
    }
    visit_AggregationAwarePropertyMapping(propertyMapping) {
        // TODO
    }
    visit_XStorePropertyMapping(propertyMapping) {
        // TODO
    }
    visit_RelationFunctionPropertyMapping(propertyMapping) {
        observe_RelationFunctionPropertyMapping(propertyMapping, this.observerContext);
    }
}
export const observe_PropertyMapping = (metamodel, context) => {
    metamodel.accept_PropertyMappingVisitor(new PropertyMappingObserver(context));
    return metamodel;
};
export const observe_InferableMappingElementIdValue = skipObserved((metamodel) => makeObservable(metamodel, {
    isDefault: computed,
    valueForSerialization: computed,
}));
export const observe_InferableMappingElementRoot = skipObserved((metamodel) => makeObservable(metamodel, {
    valueForSerialization: computed,
}));
const observe_Abstract_SetImplementation = (metamodel) => {
    makeObservable(metamodel, {
        root: observable,
    });
    observe_PackageableElementReference(metamodel.class);
    observe_InferableMappingElementIdValue(metamodel.id);
    observe_InferableMappingElementRoot(metamodel.root);
};
const observe_MappingClass = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        setImplementation: observable,
        class: observable,
        properties: observable,
    });
    // TODO
    return metamodel;
});
export const observe_Abstract_InstanceSetImplementation = (metamodel, context) => {
    observe_Abstract_SetImplementation(metamodel);
    makeObservable(metamodel, {
        mappingClass: observable,
        propertyMappings: observable,
    });
    if (metamodel.mappingClass) {
        observe_MappingClass(metamodel.mappingClass);
    }
    metamodel.propertyMappings.forEach((propertyMapping) => observe_PropertyMapping(propertyMapping, context));
};
export const observe_SetImplementationContainer = skipObserved((metamodel) => {
    makeObservable(metamodel, {});
    observe_SetImplementationReference(metamodel.setImplementation);
    return metamodel;
});
export const observe_Abstract_OperationSetImplementation = (metamodel) => {
    observe_Abstract_SetImplementation(metamodel);
    makeObservable(metamodel, {
        parameters: observable,
        operation: observable,
        hashCode: computed,
    });
    metamodel.parameters.forEach(observe_SetImplementationContainer);
};
export const observe_OperationSetImplementation = skipObserved((metamodel) => {
    observe_Abstract_OperationSetImplementation(metamodel);
    return metamodel;
});
export const observe_MergeOperationSetImplementation = skipObserved((metamodel) => {
    observe_Abstract_OperationSetImplementation(metamodel);
    makeObservable(metamodel, {
        validationFunction: observable,
    });
    observe_RawLambda(metamodel.validationFunction);
    return metamodel;
});
export const observe_PureInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_InstanceSetImplementation(metamodel, context);
    makeObservable(metamodel, {
        filter: observable,
        hashCode: computed,
    });
    if (metamodel.srcClass) {
        observe_PackageableElementReference(metamodel.srcClass);
    }
    if (metamodel.filter) {
        observe_RawLambda(metamodel.filter);
    }
    return metamodel;
});
export const observe_RelationFunctionInstanceSetImplementation = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_InstanceSetImplementation(metamodel, context);
    makeObservable(metamodel, {
        relationFunction: observable,
        hashCode: computed,
    });
    if (metamodel.relationFunction) {
        observe_ConcreteFunctionDefinition(metamodel.relationFunction, context);
    }
    return metamodel;
});
const observe_INTERNAL__UnknownSetImplementation = skipObserved((metamodel) => {
    observe_Abstract_SetImplementation(metamodel);
    makeObservable(metamodel, {
        content: observable.ref,
    });
    return metamodel;
});
class SetImplementationObserver {
    observerContext;
    constructor(observerContext) {
        this.observerContext = observerContext;
    }
    visit_SetImplementation(setImplementation) {
        const extraObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraSetImplementationObservers?.() ?? []);
        for (const observer of extraObservers) {
            const observedSetImplementation = observer(setImplementation, this.observerContext);
            if (observedSetImplementation) {
                return;
            }
        }
    }
    visit_INTERNAL__UnknownSetImplementation(setImplementation) {
        observe_INTERNAL__UnknownSetImplementation(setImplementation);
    }
    visit_MergeOperationSetImplementation(setImplementation) {
        observe_MergeOperationSetImplementation(setImplementation);
    }
    visit_OperationSetImplementation(setImplementation) {
        observe_OperationSetImplementation(setImplementation);
    }
    visit_PureInstanceSetImplementation(setImplementation) {
        observe_PureInstanceSetImplementation(setImplementation, this.observerContext);
    }
    visit_FlatDataInstanceSetImplementation(setImplementation) {
        observe_FlatDataInstanceSetImplementation(setImplementation, this.observerContext);
    }
    visit_EmbeddedFlatDataSetImplementation(setImplementation) {
        return;
    }
    visit_RelationalInstanceSetImplementation(setImplementation) {
        observe_RelationalInstanceSetImplementation(setImplementation, this.observerContext);
    }
    visit_RootRelationalInstanceSetImplementation(setImplementation) {
        observe_RootRelationalInstanceSetImplementation(setImplementation, this.observerContext);
    }
    visit_RelationFunctionInstanceSetImplementation(setImplementation) {
        observe_RelationFunctionInstanceSetImplementation(setImplementation, this.observerContext);
    }
    visit_AggregationAwareSetImplementation(setImplementation) {
        // TODO
    }
    visit_INTERNAL__UnresolvedSetImplementation(setImplementation) {
        return;
    }
}
export const observe_SetImplementation = (metamodel, context) => {
    metamodel.accept_SetImplementationVisitor(new SetImplementationObserver(context));
    return metamodel;
};
export const observe_SubstituteStore = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        original: observable,
        substitute: observable,
    });
    observe_PackageableElementReference(metamodel.original);
    observe_PackageableElementReference(metamodel.substitute);
    return metamodel;
});
export const observe_MappingInclude = skipObserved((metamodel) => {
    // TODO: handle for mapping include data product
    if (metamodel instanceof MappingIncludeMapping) {
        makeObservable(metamodel, {
            included: observable,
            storeSubstitutions: observable,
        });
        observe_PackageableElementReference(metamodel.included);
        metamodel.storeSubstitutions.forEach(observe_SubstituteStore);
        return metamodel;
    }
    return metamodel;
});
export const observe_SourceValue = skipObserved((metamodel) => makeObservable(metamodel, {
    value: observable,
}));
export const observe_EnumValueMapping = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        sourceValues: observable,
        hashCode: computed,
    });
    observe_EnumValueReference(metamodel.enum);
    metamodel.sourceValues.forEach(observe_SourceValue);
    return metamodel;
});
export const observe_EnumerationMapping = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        sourceType: observable,
        enumValueMappings: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.enumeration);
    observe_InferableMappingElementIdValue(metamodel.id);
    if (metamodel.sourceType) {
        observe_PackageableElementReference(metamodel.sourceType);
    }
    metamodel.enumValueMappings.forEach(observe_EnumValueMapping);
    return metamodel;
});
export const observe_AssociationImplementation = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        id: observable,
        stores: observable,
        propertyMappings: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.association);
    observe_InferableMappingElementIdValue(metamodel.id);
    metamodel.stores.forEach(observe_PackageableElementReference);
    metamodel.propertyMappings.forEach((propertyMapping) => observe_PropertyMapping(propertyMapping, context));
    return metamodel;
});
export const observe_ObjectInputData = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        inputType: observable,
        data: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.sourceClass);
    return metamodel;
});
export const observe_InputData = (metamodel, context) => {
    if (metamodel instanceof DEPRECATED__ObjectInputData) {
        return observe_ObjectInputData(metamodel);
    }
    else if (metamodel instanceof DEPRECATED__FlatDataInputData) {
        return observe_FlatDataInputData(metamodel);
    }
    else if (metamodel instanceof DEPRECATED__RelationalInputData) {
        return observe_RelationalInputData(metamodel);
    }
    const extraObservers = context.plugins.flatMap((plugin) => plugin.getExtraMappingTestInputDataObservers?.() ?? []);
    for (const observer of extraObservers) {
        const observed = observer(metamodel, context);
        if (observed) {
            return observed;
        }
    }
    return metamodel;
};
export const observe_ExpectedOutputMappingTestAssert = skipObserved((metamodel) => makeObservable(metamodel, {
    expectedOutput: observable,
    hashCode: computed,
}));
export const observe_MappingTestAssert = (metamodel, context) => {
    if (metamodel instanceof DEPRECATED__ExpectedOutputMappingTestAssert) {
        return observe_ExpectedOutputMappingTestAssert(metamodel);
    }
    return metamodel;
};
export const observe_MappingTest_Legacy = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        name: observable,
        query: observable,
        inputData: observable,
        assert: observable,
        hashCode: computed,
    });
    observe_RawLambda(metamodel.query);
    metamodel.inputData.forEach((inputData) => observe_InputData(inputData, context));
    observe_MappingTestAssert(metamodel.assert, context);
    return metamodel;
});
export const observe_Mapping = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_PackageableElement(metamodel);
    makeObservable(metamodel, {
        includes: observable,
        classMappings: observable,
        enumerationMappings: observable,
        associationMappings: observable,
        test: observable,
        tests: observable,
        _elementHashCode: override,
    });
    // TODO: create extension mechanism to observe mapping includes when we build editor for this
    metamodel.includes.forEach(observe_MappingInclude);
    metamodel.classMappings.forEach((classMapping) => observe_SetImplementation(classMapping, context));
    metamodel.enumerationMappings.forEach(observe_EnumerationMapping);
    metamodel.associationMappings.forEach((associationMapping) => observe_AssociationImplementation(associationMapping, context));
    metamodel.test.forEach((t) => observe_MappingTest_Legacy(t, context));
    metamodel.tests.forEach((testSuite) => observe_TestSuite(testSuite, context));
    return metamodel;
});
// ------------------------------------- Connection -------------------------------------
export const observe_Abstract_Connection = (metamodel) => {
    makeObservable(metamodel, {
        store: observable,
    });
    if (metamodel.store) {
        observe_PackageableElementReference(metamodel.store);
    }
};
export const observe_ConnectionPointer = skipObserved((metamodel) => {
    observe_Abstract_Connection(metamodel);
    makeObservable(metamodel, {
        hashCode: computed,
    });
    return metamodel;
});
export const observe_JsonModelConnection = skipObserved((metamodel) => {
    observe_Abstract_Connection(metamodel);
    makeObservable(metamodel, {
        url: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.class);
    return metamodel;
});
export const observe_XmlModelConnection = skipObserved((metamodel) => {
    observe_Abstract_Connection(metamodel);
    makeObservable(metamodel, {
        url: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.class);
    return metamodel;
});
export const observe_ModelChainConnection = skipObserved((metamodel) => {
    observe_Abstract_Connection(metamodel);
    makeObservable(metamodel, { mappings: observable, hashCode: computed });
    metamodel.mappings.forEach(observe_PackageableElementReference);
    return metamodel;
});
const observe_INTERNAL__UnknownConnection = skipObserved((metamodel) => {
    observe_Abstract_Connection(metamodel);
    makeObservable(metamodel, {
        content: observable.ref,
        hashCode: computed,
    });
    return metamodel;
});
class ConnectionObserver {
    observerContext;
    constructor(observerContext) {
        this.observerContext = observerContext;
    }
    visit_Connection(connection) {
        const extraObservers = this.observerContext.plugins.flatMap((plugin) => plugin.getExtraConnectionObservers?.() ?? []);
        for (const observer of extraObservers) {
            const observedConnection = observer(connection, this.observerContext);
            if (observedConnection) {
                return;
            }
        }
    }
    visit_INTERNAL__UnknownConnection(connection) {
        observe_INTERNAL__UnknownConnection(connection);
    }
    visit_ConnectionPointer(connection) {
        observe_ConnectionPointer(connection);
    }
    visit_ModelChainConnection(connection) {
        observe_ModelChainConnection(connection);
    }
    visit_JsonModelConnection(connection) {
        observe_JsonModelConnection(connection);
    }
    visit_XmlModelConnection(connection) {
        observe_XmlModelConnection(connection);
    }
    visit_FlatDataConnection(connection) {
        observe_FlatDataConnection(connection);
    }
    visit_RelationalDatabaseConnection(connection) {
        observe_RelationalDatabaseConnection(connection, this.observerContext);
    }
}
export const observe_Connection = (metamodel, context) => {
    metamodel.accept_ConnectionVisitor(new ConnectionObserver(context));
    return metamodel;
};
export const observe_PackageableConnection = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_PackageableElement(metamodel);
    makeObservable(metamodel, {
        connectionValue: observable,
        _elementHashCode: override,
    });
    observe_Connection(metamodel.connectionValue, context);
    return metamodel;
});
// ------------------------------------- Runtime -------------------------------------
export const observe_IdentifiedConnection = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        id: observable,
        connection: observable,
        hashCode: computed,
    });
    observe_Connection(metamodel.connection, context);
    return metamodel;
});
export const observe_StoreConnections = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        storeConnections: observable,
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.store);
    metamodel.storeConnections.forEach((connection) => observe_IdentifiedConnection(connection, context));
    return metamodel;
});
export const observe_EngineRuntime = skipObservedWithContext((metamodel, context) => {
    makeObservable(metamodel, {
        mappings: observable,
        connections: observable,
        hashCode: computed,
    });
    metamodel.mappings.forEach(observe_PackageableElementReference);
    metamodel.connections.forEach((storeConnections) => observe_StoreConnections(storeConnections, context));
    if (metamodel instanceof LakehouseRuntime) {
        makeObservable(metamodel, {
            environment: observable,
            warehouse: observable,
            connectionPointer: observable,
        });
        if (metamodel.connectionPointer) {
            observe_ConnectionPointer(metamodel.connectionPointer);
        }
    }
    return metamodel;
});
export const observe_RuntimePointer = skipObserved((metamodel) => {
    makeObservable(metamodel, {
        hashCode: computed,
    });
    observe_PackageableElementReference(metamodel.packageableRuntime);
    return metamodel;
});
export const observe_Runtime = (metamodel, context) => {
    if (metamodel instanceof RuntimePointer) {
        return observe_RuntimePointer(metamodel);
    }
    else if (metamodel instanceof EngineRuntime) {
        return observe_EngineRuntime(metamodel, context);
    }
    return metamodel;
};
export const observe_PackageableRuntime = skipObservedWithContext((metamodel, context) => {
    observe_Abstract_PackageableElement(metamodel);
    makeObservable(metamodel, {
        runtimeValue: observable,
        _elementHashCode: override,
    });
    observe_EngineRuntime(metamodel.runtimeValue, context);
    return metamodel;
});
//# sourceMappingURL=DSL_Mapping_ObserverHelper.js.map