"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var lodash_es_1 = require("lodash-es");
var React = require("react");
var react_redux_1 = require("react-redux");
var Root_1 = require("./components/Root");
var createStore_1 = require("./redux/createStore");
exports.store = createStore_1.default();
var Main = /** @class */ (function (_super) {
    __extends(Main, _super);
    function Main() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * Escape hatch
         */
        _this.export = function () {
            var state = exports.store.getState();
            return {
                debug: true,
                map: lodash_es_1.cloneDeep(state.canvas),
                assets: {
                    images: []
                },
                screen: {
                    width: state.canvas.tables[0][0].length * 32,
                    height: state.canvas.tables[0].length * 32
                }
            };
        };
        return _this;
    }
    Main.prototype.render = function () {
        return (React.createElement(react_redux_1.Provider, { store: exports.store },
            React.createElement(Root_1.Root, __assign({}, this.props))));
    };
    return Main;
}(React.Component));
exports.default = Main;
//# sourceMappingURL=index.js.map