/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { Base, String_$type, fromEnum, Number_$type, markType } from "./type";
import { List$1 } from "./List$1";
import { CodeGenerationItemBuilderPropertyInfo } from "./CodeGenerationItemBuilderPropertyInfo";
import { Dictionary$2 } from "./Dictionary$2";
import { CodeGeneratingImportManager } from "./CodeGeneratingImportManager";
/**
 * @hidden
 */
var CodeGeneratingRendererResult = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(CodeGeneratingRendererResult, _super);
    function CodeGeneratingRendererResult() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.n = new List$1(CodeGenerationItemBuilderPropertyInfo.$, 0);
        _this._platform = 0;
        _this._generationOptions = null;
        _this.j = new Dictionary$2(String_$type, List$1.$.specialize(String_$type), 0);
        _this.l = new Dictionary$2(String_$type, List$1.$.specialize(CodeGeneratingImportManager.$), 0);
        _this.i = new Dictionary$2(String_$type, List$1.$.specialize(String_$type), 0);
        _this.g = new Dictionary$2(String_$type, Number_$type, 0);
        _this.m = new Dictionary$2(String_$type, String_$type, 0);
        _this.k = new Dictionary$2(String_$type, String_$type, 0);
        _this.h = new Dictionary$2(String_$type, Number_$type, 0);
        return _this;
    }
    Object.defineProperty(CodeGeneratingRendererResult.prototype, "q", {
        get: function () {
            return this.n;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CodeGeneratingRendererResult.prototype, "platform", {
        get: function () {
            return this._platform;
        },
        set: function (a) {
            this._platform = a;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CodeGeneratingRendererResult.prototype, "generationOptions", {
        get: function () {
            return this._generationOptions;
        },
        set: function (a) {
            this._generationOptions = a;
        },
        enumerable: true,
        configurable: true
    });
    CodeGeneratingRendererResult.prototype.addContainerResult = function (a, b) {
        if (!this.j.containsKey(a)) {
            this.j.addItem(a, new List$1(String_$type, 0));
        }
        var c = this.j.item(a);
        c.add(b);
    };
    CodeGeneratingRendererResult.prototype.addImportResult = function (a, b) {
        if (!this.l.containsKey(a)) {
            this.l.addItem(a, new List$1(CodeGeneratingImportManager.$, 0));
        }
        var c = this.l.item(a);
        c.add(b);
    };
    CodeGeneratingRendererResult.prototype.addContainerNewFileResult = function (a, b) {
        if (!this.i.containsKey(a)) {
            this.i.addItem(a, new List$1(String_$type, 0));
        }
        var c = this.i.item(a);
        c.add(b);
    };
    CodeGeneratingRendererResult.prototype.getKeys = function () {
        var e_1, _a;
        var a = new List$1(String_$type, 0);
        try {
            for (var _b = tslib_1.__values(fromEnum(this.j.keys)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                a.add(b);
            }
        }
        catch (e_1_1) {
            e_1 = { error: e_1_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_1)
                    throw e_1.error;
            }
        }
        return a.toArray();
    };
    CodeGeneratingRendererResult.prototype.getImportsKeys = function () {
        var e_2, _a;
        var a = new List$1(String_$type, 0);
        try {
            for (var _b = tslib_1.__values(fromEnum(this.l.keys)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                a.add(b);
            }
        }
        catch (e_2_1) {
            e_2 = { error: e_2_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_2)
                    throw e_2.error;
            }
        }
        return a.toArray();
    };
    CodeGeneratingRendererResult.prototype.getContentForKey = function (a) {
        var e_3, _a;
        if (!this.j.containsKey(a)) {
            return "";
        }
        var b = this.j.item(a);
        if (b.count == 1) {
            return b._inner[0];
        }
        var c = "";
        try {
            for (var _b = tslib_1.__values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                c += d;
            }
        }
        catch (e_3_1) {
            e_3 = { error: e_3_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_3)
                    throw e_3.error;
            }
        }
        return c;
    };
    CodeGeneratingRendererResult.prototype.o = function (a) {
        if (!this.l.containsKey(a)) {
            return null;
        }
        return this.l.item(a);
    };
    CodeGeneratingRendererResult.prototype.r = function (a) {
        if (!this.g.containsKey(a)) {
            this.g.item(a, 1);
        }
        var b = this.g.item(a);
        var c = a + b;
        this.g.item(a, b + 1);
        return c;
    };
    CodeGeneratingRendererResult.prototype.ab = function (a) {
        this.n.add(a);
    };
    CodeGeneratingRendererResult.prototype.getNewFiles = function () {
        var e_4, _a;
        var a = new List$1(String_$type, 0);
        try {
            for (var _b = tslib_1.__values(fromEnum(this.i.keys)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                a.add(b);
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
        return a;
    };
    CodeGeneratingRendererResult.prototype.getNewFileContent = function (a) {
        var e_5, _a;
        var b = this.i.item(a);
        var c = "";
        try {
            for (var _b = tslib_1.__values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                c += d;
            }
        }
        catch (e_5_1) {
            e_5 = { error: e_5_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_5)
                    throw e_5.error;
            }
        }
        return c;
    };
    CodeGeneratingRendererResult.prototype.defineString = function (a, b) {
        this.m.item(a, b);
    };
    CodeGeneratingRendererResult.prototype.getStringNames = function () {
        var e_6, _a;
        var a = new List$1(String_$type, 0);
        try {
            for (var _b = tslib_1.__values(fromEnum(this.m.keys)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                a.add(b);
            }
        }
        catch (e_6_1) {
            e_6 = { error: e_6_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_6)
                    throw e_6.error;
            }
        }
        return a.toArray();
    };
    CodeGeneratingRendererResult.prototype.getString = function (a) {
        return this.m.item(a);
    };
    CodeGeneratingRendererResult.prototype.trackDescriptionField = function (a, b) {
        this.k.item(a, b);
    };
    CodeGeneratingRendererResult.prototype.hasDescription = function (a) {
        return this.k.containsKey(a);
    };
    CodeGeneratingRendererResult.prototype.getDescriptionField = function (a) {
        return this.k.item(a);
    };
    CodeGeneratingRendererResult.prototype.s = function (a) {
        var b = 0;
        if (!this.h.containsKey(a)) {
            this.h.addItem(a, b);
        }
        else {
            b = this.h.item(a);
        }
        b++;
        this.h.item(a, b);
        return a + b;
    };
    CodeGeneratingRendererResult.$t = markType(CodeGeneratingRendererResult, 'CodeGeneratingRendererResult');
    return CodeGeneratingRendererResult;
}(Base));
export { CodeGeneratingRendererResult };
//# sourceMappingURL=CodeGeneratingRendererResult.js.map
