"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
var antd_1 = require("antd");
function Checkbox(_a) {
    var children = _a.children, checked = _a.checked, defaultValue = _a.defaultValue, onChange = _a.onChange;
    var check = ((0, jsx_runtime_1.jsx)(antd_1.Checkbox, __assign({ checked: checked, onChange: function (e) { return onChange(e.target.checked); } }, { children: children })));
    if (defaultValue == null)
        return check;
    return ((0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [check, " ", (0, jsx_runtime_1.jsxs)(antd_1.Button, __assign({ type: "dashed", disabled: checked == defaultValue, style: { marginLeft: "5px" }, onClick: function () { return onChange(defaultValue); } }, { children: ["(", defaultValue ? "default is checked" : "default is unchecked", ")"] }))] }));
}
exports.default = Checkbox;
//# sourceMappingURL=checkbox.js.map