"use strict";
var __extends = (this && this.__extends) || (function () {
    var 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 function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var lib_1 = require("typestyle/lib");
var csstips = require("csstips/lib");
var LayerView_1 = require("../containers/LayerView");
var CanvasView_1 = require("../containers/CanvasView");
var PaletteView_1 = require("../containers/PaletteView");
var MenuBar_1 = require("../containers/MenuBar");
var root = lib_1.style(csstips.vertical, {
    height: '100%'
});
var container = lib_1.style(csstips.flex, csstips.horizontal, {
    backgroundColor: 'lightgrey'
});
var menu = lib_1.style(csstips.content, {
    height: 64
});
var Root = /** @class */ (function (_super) {
    __extends(Root, _super);
    function Root() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Root.prototype.componentDidMount = function () {
        if (this.props.map) {
            this.props.initMap(this.props.map);
        }
        if (this.props.tileset) {
            this.props.addTileset(this.props.tileset);
        }
    };
    Root.prototype.render = function () {
        return (React.createElement("div", { className: root },
            React.createElement("div", { className: container },
                React.createElement(LayerView_1.default, null),
                React.createElement(CanvasView_1.default, null),
                React.createElement(PaletteView_1.default, null)),
            React.createElement(MenuBar_1.default, null)));
    };
    return Root;
}(React.Component));
exports.default = Root;
//# sourceMappingURL=Root.js.map