package jetbrains.mps.samples.ChemMastery.actions;

/*Generated by MPS */

import jetbrains.mps.openapi.actions.descriptor.NodeFactory;
import org.jetbrains.mps.openapi.model.SNode;
import org.jetbrains.mps.openapi.model.SModel;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations;
import org.jetbrains.mps.openapi.language.SConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.jetbrains.mps.openapi.language.SProperty;

public class ElementFactories {
  public static class NodeFactory_6567999678834696497 implements NodeFactory {
    public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, int index, SModel model) {
      {
        final SNode original = sampleNode;
        if (SNodeOperations.isInstanceOf(original, CONCEPTS.ElementRef$EZ)) {
          SPropertyOperations.assign(newNode, PROPS.ionization$uiAv, SPropertyOperations.getInteger(original, PROPS.ionization$uiAv));
        }
      }
    }
  }
  public static class NodeFactory_3123291046851857615 implements NodeFactory {
    public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, int index, SModel model) {
      {
        final SNode original = sampleNode;
        if (SNodeOperations.isInstanceOf(original, CONCEPTS.CompoundComponentWithCardinality$_V)) {
          SPropertyOperations.assign(newNode, PROPS.cardinality$Vf8r, SPropertyOperations.getInteger(original, PROPS.cardinality$Vf8r));
          SPropertyOperations.assign(newNode, PROPS.cardinalityVisible$Vfns, SPropertyOperations.getBoolean(original, PROPS.cardinalityVisible$Vfns));
        }
      }
    }
  }
  public static class NodeFactory_6744317956898850832 implements NodeFactory {
    public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, int index, SModel model) {
      {
        final SNode original = sampleNode;
        if (SNodeOperations.isInstanceOf(original, CONCEPTS.Compound$vn)) {
          SPropertyOperations.assign(newNode, PROPS.cardinality$ubQr, SPropertyOperations.getInteger(original, PROPS.cardinality$ubQr));
          SPropertyOperations.assign(newNode, PROPS.cardinalityVisible$7IlK, SPropertyOperations.getBoolean(original, PROPS.cardinalityVisible$7IlK));
        }
      }
    }
  }

  private static final class CONCEPTS {
    /*package*/ static final SConcept ElementRef$EZ = MetaAdapterFactory.getConcept(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x6ef7184faba6297bL, "jetbrains.mps.samples.ChemMastery.structure.ElementRef");
    /*package*/ static final SConcept CompoundComponentWithCardinality$_V = MetaAdapterFactory.getConcept(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x2b5828a8c1c2fd50L, "jetbrains.mps.samples.ChemMastery.structure.CompoundComponentWithCardinality");
    /*package*/ static final SConcept Compound$vn = MetaAdapterFactory.getConcept(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x6ef7184faba62978L, "jetbrains.mps.samples.ChemMastery.structure.Compound");
  }

  private static final class PROPS {
    /*package*/ static final SProperty ionization$uiAv = MetaAdapterFactory.getProperty(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x6ef7184faba6297bL, 0x6ef7184faba62980L, "ionization");
    /*package*/ static final SProperty cardinality$Vf8r = MetaAdapterFactory.getProperty(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x2b5828a8c1c2fd50L, 0x2b5828a8c1c2fd51L, "cardinality");
    /*package*/ static final SProperty cardinalityVisible$Vfns = MetaAdapterFactory.getProperty(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x2b5828a8c1c2fd50L, 0x2b5828a8c1c2fd52L, "cardinalityVisible");
    /*package*/ static final SProperty cardinality$ubQr = MetaAdapterFactory.getProperty(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x6ef7184faba62978L, 0x6ef7184faba62979L, "cardinality");
    /*package*/ static final SProperty cardinalityVisible$7IlK = MetaAdapterFactory.getProperty(0xa9a262e8f8054598L, 0x88c614f38937d309L, 0x6ef7184faba62978L, 0x6ef7184fabe70dd6L, "cardinalityVisible");
  }
}
