import '../../../../globals.js';
// Copyright 2021-2024, University of Colorado Boulder
/**
 * A poolable internal representation of a row/column for grid handling in GridConstraint
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Pool from '../../../../phet-core/js/Pool.js';
import { LayoutLine, scenery } from '../../imports.js';
class GridLine extends LayoutLine {
    /**
     * (scenery-internal)
     */
    constructor(index, cells, grow) {
        super();
        this.initialize(index, cells, grow);
    }
    /**
     * (scenery-internal)
     */
    initialize(index, cells, grow) {
        this.index = index;
        this.cells = cells;
        this.grow = grow;
        this.initializeLayoutLine();
        return this;
    }
    /**
     * (scenery-internal)
     */
    freeToPool() {
        GridLine.pool.freeToPool(this);
    }
    clean() {
        this.cells.length = 0;
        this.freeToPool();
    }
}
/**
 * (scenery-internal)
 */
GridLine.pool = new Pool(GridLine, {
    defaultArguments: [0, [], 0]
});
export default GridLine;
scenery.register('GridLine', GridLine);
//# sourceMappingURL=GridLine.js.map