import '../../../globals.js';
// Copyright 2013-2022, University of Colorado Boulder
/**
 * CH2O Molecule
 *
 * @author Chris Malley (PixelZoom, Inc.)
 */
import merge from '../../../phet-core/js/merge.js';
import Element from '../Element.js';
import nitroglycerin from '../nitroglycerin.js';
import AtomNode from './AtomNode.js';
import MoleculeNode from './MoleculeNode.js';
export default class CH2ONode extends MoleculeNode {
    constructor(providedOptions) {
        const atomNodeOptions = providedOptions?.atomNodeOptions;
        // atoms
        const leftNode = new AtomNode(Element.C, atomNodeOptions);
        const smallOffset = 0.165 * leftNode.width;
        const rightNode = new AtomNode(Element.O, merge({
            centerX: leftNode.right + (0.25 * leftNode.width),
            centerY: leftNode.centerY
        }, atomNodeOptions));
        const smallTopNode = new AtomNode(Element.H, merge({
            centerX: leftNode.left + smallOffset,
            centerY: leftNode.top + smallOffset
        }, atomNodeOptions));
        const smallBottomNode = new AtomNode(Element.H, merge({
            centerX: smallTopNode.centerX,
            centerY: leftNode.bottom - smallOffset
        }, atomNodeOptions));
        const atomNodes = [smallTopNode, leftNode, rightNode, smallBottomNode];
        super(atomNodes, providedOptions);
    }
}
nitroglycerin.register('CH2ONode', CH2ONode);
//# sourceMappingURL=CH2ONode.js.map