"use strict";
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectionAttributeState = void 0;
/**
 * This node maintains the attribute's state during projection and between stages of a operations
 * and links to collection of previous projection states
 * @internal
 */
class ProjectionAttributeState {
    /**
     * Create a new empty state
     */
    constructor(ctx) {
        this.ctx = ctx;
    }
    /**
     * Creates a copy of the state and sets its previous state to be itself
     * @internal
     */
    copy() {
        const copy = new ProjectionAttributeState(this.ctx);
        copy.currentResolvedAttribute = this.currentResolvedAttribute;
        copy.previousStateList = [this];
        copy.ordinal = this.ordinal;
        return copy;
    }
}
exports.ProjectionAttributeState = ProjectionAttributeState;
//# sourceMappingURL=ProjectionAttributeState.js.map