"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const socket_1 = __importDefault(require("./socket"));
const Project = __importStar(require("../../project/src"));
const Pack = __importStar(require("../../pack/src"));
const Debug = __importStar(require("../../debug/src"));
const server_1 = __importDefault(require("./server"));
class AntEngine {
    constructor() {
        AntCube.socket.on('connection', ({ client }) => {
            if (client.session) {
                const ftp = AntCube.server.connectInfo();
                AntCube.socket.send({
                    token: client.session.token,
                    data: JSON.stringify({
                        status: 200,
                        key: 'ide_information',
                        payload: {
                            ftp_host: ftp.ip,
                            ftp_port: ftp.port
                        }
                    })
                });
            }
        });
    }
}
exports.AntEngine = AntEngine;
var AntCube;
(function (AntCube) {
    AntCube.project = new Project.ACProject();
    AntCube.socket = new socket_1.default();
    AntCube.pack = new Pack.ACPack();
    AntCube.inspect = new Debug.ACInspect();
    AntCube.server = new server_1.default();
    AntCube.engine = new AntEngine();
    AntCube.lint = new Debug.ACLint();
})(AntCube = exports.AntCube || (exports.AntCube = {}));
exports.default = AntCube;
//# sourceMappingURL=engine.js.map