import '../../globals.js';
import Element from './Element.js';
import nitroglycerin from './nitroglycerin.js';
let idCounter = 1;
export default class Atom {
    constructor(element) {
        this.element = element;
        // Unpack Element, for convenience.
        this.symbol = element.symbol;
        this.covalentRadius = element.covalentRadius;
        this.covalentDiameter = element.covalentRadius * 2;
        this.electronegativity = element.electronegativity;
        this.atomicWeight = element.atomicWeight;
        this.color = element.color;
        this.reference = (idCounter++).toString(16);
        this.id = `${this.symbol}_${this.reference}`;
    }
    static createAtomFromSymbol(symbol) {
        return new Atom(Element.getElementBySymbol(symbol));
    }
    hasSameElement(atom) {
        return this.element.isSameElement(atom.element);
    }
    isHydrogen() {
        return this.element.isHydrogen();
    }
    isCarbon() {
        return this.element.isCarbon();
    }
    isOxygen() {
        return this.element.isOxygen();
    }
    toString() {
        return this.symbol;
    }
}
nitroglycerin.register('Atom', Atom);
//# sourceMappingURL=Atom.js.map