import { MicroEditorBase } from "../../../Views/editor/MicroEditorBase.js";
export class ViewEditor extends MicroEditorBase {
    get buttonNode() {
        return this.node.children("button");
    }
    get inputNode() {
        return this.node.children("input");
    }
    get inputValue() {
        return this.inputNode.val();
    }
    set inputValue(value) {
        this.inputNode.val(value);
    }
    template() {
        return `<div class="-fb-view-editor">
                    <input type="text" tabIndex="-1" disabled />
                    <button>...</button>
                </div>`;
    }
    focus() {
        this.buttonNode.focus();
    }
    onActivate(e) {
        super.onActivate(e);
        this.inputNode.on(Jade.BrowserEvent.MOUSEDOWN, (e) => {
            this.buttonNode.focus();
            console.log("buttonNode focus");
        });
        this.buttonNode.on(Jade.BrowserEvent.CLICK, (e) => {
            this.showViewEditorDialog();
        });
        this.inputValue = "Configure view...";
    }
    showViewEditorDialog() {
    }
}
