"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var aleph_core_js_1 = require("../aleph.core.js");
var chunk_1519ad9e_js_1 = require("./chunk-1519ad9e.js");
var AlControlPanel = function () { function e() { this.boundingBoxVisible = !1, this.displayMode = chunk_1519ad9e_js_1.a.MESH, this.optionsEnabled = !1, this.optionsVisible = !0, this.orientation = chunk_1519ad9e_js_1.b.CORONAL, this.nodesEnabled = !1, this.nodesVisible = !0; } return e.prototype._boundingBoxVisible = function (e) { this.boundingBoxVisible = e, this.onSetBoundingBoxVisible.emit(e); }, e.prototype._displayMode = function (e) { this.displayMode = e, this.onSetDisplayMode.emit(e); }, e.prototype._optionsEnabled = function (e) { this.optionsEnabled = e, this.onSetOptionsEnabled.emit(e); }, e.prototype._optionsVisible = function (e) { this.optionsVisible = e; }, e.prototype._orientation = function (e) { this.orientation = e, this.onSetOrientation.emit(e); }, e.prototype._slicesIndex = function (e) { this.slicesIndex = e, this.onSetSlicesIndex.emit(e); }, e.prototype._slicesWindowCenter = function (e) { this.slicesWindowCenter = e, this.onSetSlicesWindowCenter.emit(e); }, e.prototype._slicesWindowWidth = function (e) { this.slicesWindowWidth = e, this.onSetSlicesWindowWidth.emit(e); }, e.prototype._stack = function (e) { this._stack = e; }, e.prototype._stackHelper = function (e) { this.stackHelper = e; }, e.prototype._nodesEnabled = function (e) { this.nodesEnabled = e, this.onSetNodesEnabled.emit(e); }, e.prototype._nodesVisible = function (e) { this.nodesVisible = e; }, e.prototype._volumeSteps = function (e) { this.volumeSteps = e, this.onSetVolumeSteps.emit(e); }, e.prototype._volumeWindowCenter = function (e) { this.volumeWindowCenter = e, this.onSetVolumeWindowCenter.emit(e); }, e.prototype._volumeWindowWidth = function (e) { this.volumeWindowWidth = e, this.onSetVolumeWindowWidth.emit(e); }, e.prototype.renderDisplayModeToggle = function () { var e = this; return this.displayMode !== chunk_1519ad9e_js_1.a.MESH ? aleph_core_js_1.h("ion-item", { id: "mode" }, aleph_core_js_1.h("ion-icon", { name: "eye" }), aleph_core_js_1.h("select", { onChange: function (t) { return e.displayMode = t.srcElement.nodeValue; } }, aleph_core_js_1.h("option", { selected: this.displayMode === chunk_1519ad9e_js_1.a.SLICES, value: chunk_1519ad9e_js_1.a.SLICES }, "Slices"), aleph_core_js_1.h("option", { selected: this.displayMode === chunk_1519ad9e_js_1.a.VOLUME, value: chunk_1519ad9e_js_1.a.VOLUME }, "Volume"))) : null; }, e.prototype.renderNodesToggle = function () { var e = this; return this.nodesVisible ? aleph_core_js_1.h("ion-item", null, aleph_core_js_1.h("ion-icon", { name: "add-circle" }), aleph_core_js_1.h("ion-toggle", { onIonChange: function (t) { return e._nodesEnabled(t.detail.checked); } })) : null; }, e.prototype.renderOptionsToggle = function () { var e = this; if (this.optionsVisible)
    return aleph_core_js_1.h("ion-item", null, aleph_core_js_1.h("ion-icon", { name: "options" }), aleph_core_js_1.h("ion-toggle", { onIonChange: function (t) { return e._optionsEnabled(t.detail.checked); } })); }, e.prototype.renderBoundingBoxEnabled = function () { var e = this; return aleph_core_js_1.h("ion-item", null, aleph_core_js_1.h("ion-label", null, "Bounding box"), aleph_core_js_1.h("ion-toggle", { checked: this.boundingBoxVisible, onIonChange: function (t) { return e._boundingBoxVisible(t.detail.checked); } })); }, e.prototype.renderOptions = function () { switch (this.displayMode) {
    case chunk_1519ad9e_js_1.a.MESH: if (this.optionsVisible && this.optionsEnabled)
        return aleph_core_js_1.h("div", null, this.renderBoundingBoxEnabled());
} }, e.prototype.render = function () { return [this.renderDisplayModeToggle(), this.renderNodesToggle(), this.renderOptionsToggle(), this.renderOptions()]; }, Object.defineProperty(e, "is", { get: function () { return "al-control-panel"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "encapsulation", { get: function () { return "shadow"; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "properties", { get: function () { return { boundingBoxVisible: { type: Boolean, attr: "bounding-box-visible", mutable: !0 }, displayMode: { type: String, attr: "display-mode", mutable: !0 }, nodesEnabled: { type: Boolean, attr: "nodes-enabled", mutable: !0 }, nodesVisible: { type: Boolean, attr: "nodes-visible", mutable: !0 }, optionsEnabled: { type: Boolean, attr: "options-enabled", mutable: !0 }, optionsVisible: { type: Boolean, attr: "options-visible", mutable: !0 }, orientation: { type: String, attr: "orientation", mutable: !0 }, slicesIndex: { type: Number, attr: "slices-index", mutable: !0 }, slicesWindowCenter: { type: Number, attr: "slices-window-center", mutable: !0 }, slicesWindowWidth: { type: Number, attr: "slices-window-width", mutable: !0 }, stack: { type: "Any", attr: "stack", mutable: !0 }, stackHelper: { type: "Any", attr: "stack-helper", mutable: !0 }, volumeSteps: { type: Number, attr: "volume-steps", mutable: !0 }, volumeWindowCenter: { type: Number, attr: "volume-window-center", mutable: !0 }, volumeWindowWidth: { type: Number, attr: "volume-window-width", mutable: !0 } }; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "events", { get: function () { return [{ name: "onSetBoundingBoxVisible", method: "onSetBoundingBoxVisible", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetDisplayMode", method: "onSetDisplayMode", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetOptionsEnabled", method: "onSetOptionsEnabled", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetOrientation", method: "onSetOrientation", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetSlicesIndex", method: "onSetSlicesIndex", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetSlicesWindowCenter", method: "onSetSlicesWindowCenter", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetSlicesWindowWidth", method: "onSetSlicesWindowWidth", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetNodesEnabled", method: "onSetNodesEnabled", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetVolumeSteps", method: "onSetVolumeSteps", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetVolumeWindowCenter", method: "onSetVolumeWindowCenter", bubbles: !0, cancelable: !0, composed: !0 }, { name: "onSetVolumeWindowWidth", method: "onSetVolumeWindowWidth", bubbles: !0, cancelable: !0, composed: !0 }]; }, enumerable: !0, configurable: !0 }), Object.defineProperty(e, "style", { get: function () { return ""; }, enumerable: !0, configurable: !0 }), e; }();
exports.AlControlPanel = AlControlPanel;
