"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Item_1 = require("./Item");
var Switch_1 = require("../../components/Switch");
;
var SwitchControl = /** @class */ (function (_super) {
    tslib_1.__extends(SwitchControl, _super);
    function SwitchControl() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SwitchControl.prototype.render = function () {
        var _a = this.props, className = _a.className, ns = _a.classPrefix, cx = _a.classnames, value = _a.value, trueValue = _a.trueValue, falseValue = _a.falseValue, option = _a.option, onChange = _a.onChange, disabled = _a.disabled, optionAtLeft = _a.optionAtLeft;
        return (React.createElement("div", { className: cx("SwitchControl", className) },
            optionAtLeft ? (React.createElement("span", { className: cx("Switch-option") }, option)) : null,
            React.createElement(Switch_1.default, { classPrefix: ns, value: value, trueValue: trueValue, falseValue: falseValue, disabled: disabled, onChange: onChange }),
            optionAtLeft ? null : (React.createElement("span", { className: cx("Switch-option") }, option))));
    };
    SwitchControl.defaultProps = {
        trueValue: true,
        falseValue: false,
        optionAtLeft: false
    };
    return SwitchControl;
}(React.Component));
exports.default = SwitchControl;
var SwitchControlRenderer = /** @class */ (function (_super) {
    tslib_1.__extends(SwitchControlRenderer, _super);
    function SwitchControlRenderer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SwitchControlRenderer = tslib_1.__decorate([
        Item_1.FormItem({
            type: 'switch',
            sizeMutable: false
        })
    ], SwitchControlRenderer);
    return SwitchControlRenderer;
}(SwitchControl));
exports.SwitchControlRenderer = SwitchControlRenderer;
;
//# sourceMappingURL=./renderers/Form/Switch.js.map
