"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 });
//React
var React = require("react");
//Wijmo
var wjInput = require("wijmo/wijmo.react.input");
var wjGauge = require("wijmo/wijmo.react.gauge");
var WjGauge = /** @class */ (function (_super) {
    __extends(WjGauge, _super);
    function WjGauge(props) {
        var _this = _super.call(this, props) || this;
        _this.state = {
            value: 50,
            min: 0,
            max: 100,
            format: 'n0',
            step: 10
        };
        _this.valueChanged = _this.valueChanged.bind(_this);
        return _this;
    }
    WjGauge.prototype.valueChanged = function (s, e) {
        this.setState({ value: s.value });
    };
    // Wijmo event handlers
    WjGauge.prototype.render = function () {
        return React.createElement("div", null,
            React.createElement("h3", null, "Gauge Controls"),
            React.createElement("p", null, "This section shows Gauge controls: LinearGauge,RadialGauge and BulletGraph."),
            React.createElement("table", { className: "table table-condensed" },
                React.createElement("tbody", null,
                    React.createElement("tr", null,
                        React.createElement("td", null,
                            React.createElement("label", { htmlFor: "n" }, "LinearGauge")),
                        React.createElement("td", null,
                            React.createElement(wjGauge.LinearGauge, { value: this.state.value, min: this.state.min, max: this.state.max, format: this.state.format, isReadOnly: false, thumbSize: 30, valueChanged: this.valueChanged }),
                            React.createElement("p", null))),
                    React.createElement("tr", null,
                        React.createElement("td", null,
                            React.createElement("label", { htmlFor: "n" }, "RadialGauge")),
                        React.createElement("td", null,
                            React.createElement(wjGauge.RadialGauge, { value: this.state.value, min: this.state.min, max: this.state.max, format: this.state.format, isReadOnly: false, valueChanged: this.valueChanged }))),
                    React.createElement("tr", null,
                        React.createElement("td", null,
                            React.createElement("label", { htmlFor: "n" }, "BulletGraph")),
                        React.createElement("td", null,
                            React.createElement(wjGauge.BulletGraph, { value: this.state.value, min: this.state.min, bad: 40, target: 60, good: 60, max: this.state.max }),
                            React.createElement("p", null))),
                    React.createElement("tr", null,
                        React.createElement("td", null,
                            React.createElement("label", { htmlFor: "n" }, "Value:")),
                        React.createElement("td", null,
                            React.createElement("div", { className: "detail" },
                                React.createElement(wjInput.InputNumber, { value: this.state.value, valueChanged: this.valueChanged, min: this.state.min, max: this.state.max, step: this.state.step, format: this.state.format })))))));
    };
    return WjGauge;
}(React.Component));
exports.WjGauge = WjGauge;
//# sourceMappingURL=WjGauge.js.map