"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.ResolvedEntityReferenceSide = void 0;
const internal_1 = require("../internal");
/**
     * @internal
     */
class ResolvedEntityReferenceSide {
    constructor(entity, rasb) {
        // let bodyCode = () =>
        {
            if (entity) {
                this.entity = entity;
            }
            if (rasb) {
                this.rasb = rasb;
            }
            else {
                this.rasb = new internal_1.ResolvedAttributeSetBuilder();
            }
        }
        // return p.measure(bodyCode);
    }
    /**
     * @internal
     */
    getFirstAttribute() {
        // let bodyCode = () =>
        {
            if (this.rasb && this.rasb.ras && this.rasb.ras.set && this.rasb.ras.set.length) {
                return this.rasb.ras.set[0];
            }
        }
        // return p.measure(bodyCode);
    }
    spew(resOpt, to, indent, nameSort) {
        // let bodyCode = () =>
        {
            to.spewLine(`${indent} ent=${this.entity.getName()}`);
            if (this.rasb && this.rasb.ras) {
                this.rasb.ras.spew(resOpt, to, `${indent}  atts:`, nameSort);
            }
        }
        // return p.measure(bodyCode);
    }
}
exports.ResolvedEntityReferenceSide = ResolvedEntityReferenceSide;
//# sourceMappingURL=ResolvedEntityReferenceSide.js.map