"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_STYLE = void 0;
const element_1 = require("../../../../../client/element");
const parentElement_1 = require("../../../../../client/platform/web/parentElement");
const Component_1 = require("../../Div/Component");
exports.DEFAULT_STYLE = {
    display: 'flex',
};
class Tree extends element_1.Element {
    constructor($props, $system) {
        super($props, $system);
        this._prop_handler = {
            style: (style = {}) => {
                this._div.setProp('style', Object.assign(Object.assign({}, exports.DEFAULT_STYLE), style));
            },
        };
        const { graph } = this.$props;
        const $element = (0, parentElement_1.default)($system);
        const div = new Component_1.default({
            style: Object.assign({}, exports.DEFAULT_STYLE),
        }, this.$system);
        this._div = div;
        this.$element = $element;
        this.$slot = {
            default: div,
        };
        this.registerRoot(div);
        if (graph) {
            this._setup(graph);
        }
    }
    _setup(graph) {
        graph.$getSpec({}, (spec) => {
            //
        });
    }
    onPropChanged(prop, current) {
        this._prop_handler[prop](current);
    }
}
exports.default = Tree;
//# sourceMappingURL=Component.js.map