"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.ResolvedTraitSetBuilder = void 0;
const internal_1 = require("../internal");
/**
     * @internal
     */
class ResolvedTraitSetBuilder {
    clear() {
        // let bodyCode = () =>
        {
            this.rts = undefined;
        }
        // return p.measure(bodyCode);
    }
    /**
     * @internal
     */
    mergeTraits(rtsNew) {
        // let bodyCode = () =>
        {
            if (rtsNew) {
                if (!this.rts) {
                    this.rts = new internal_1.ResolvedTraitSet(rtsNew.resOpt);
                }
                this.rts = this.rts.mergeSet(rtsNew);
            }
        }
        // return p.measure(bodyCode);
    }
    /**
     * @internal
     */
    takeReference(rtsNew) {
        // let bodyCode = () =>
        {
            this.rts = rtsNew;
        }
        // return p.measure(bodyCode);
    }
    ownOne(rt, resOpt) {
        // let bodyCode = () =>
        {
            this.rts = new internal_1.ResolvedTraitSet(resOpt);
            this.rts.merge(rt, false);
        }
        // return p.measure(bodyCode);
    }
    setTraitParameterValue(resOpt, toTrait, paramName, value) {
        // let bodyCode = () =>
        {
            this.rts = this.rts.setTraitParameterValue(resOpt, toTrait, paramName, value);
        }
        // return p.measure(bodyCode);
    }
    replaceTraitParameterValue(resOpt, toTrait, paramName, valueWhen, valueNew) {
        // let bodyCode = () =>
        {
            if (this.rts) {
                this.rts = this.rts.replaceTraitParameterValue(resOpt, toTrait, paramName, valueWhen, valueNew);
            }
        }
        // return p.measure(bodyCode);
    }
}
exports.ResolvedTraitSetBuilder = ResolvedTraitSetBuilder;
//# sourceMappingURL=ResolvedTraitSetBuilder.js.map