"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConsoleData = exports.addDto = exports.addTable = void 0;
class ConsoleApplication {
    constructor() {
        this.tableNames = {};
        this.tables = [];
        this.dtos = [];
        this.addTable = (name, className, data) => __awaiter(this, void 0, void 0, function* () {
            this.tableNames = Object.assign(Object.assign({}, this.tableNames), { [className]: name });
            const tableInfo = { name, columns: [], data };
            this.tables.push(tableInfo);
        });
        this.addDto = (name, className, data) => __awaiter(this, void 0, void 0, function* () {
            const dtoInfo = { name, columns: [], data };
            this.dtos.push(dtoInfo);
        });
        this.getConsoleData = () => __awaiter(this, void 0, void 0, function* () {
            const data = { tables: this.tables, dtos: this.dtos };
            return data;
        });
    }
}
_a = new ConsoleApplication(), exports.addTable = _a.addTable, exports.addDto = _a.addDto, exports.getConsoleData = _a.getConsoleData;
//# sourceMappingURL=index.js.map