"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const antd_1 = require("antd");
function Checkbox({ children, checked, defaultValue, onChange, }) {
    const check = ((0, jsx_runtime_1.jsx)(antd_1.Checkbox, { checked: checked, onChange: (e) => 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, { type: "dashed", disabled: checked == defaultValue, style: { marginLeft: "5px" }, onClick: () => onChange(defaultValue), children: ["(", defaultValue ? "default is checked" : "default is unchecked", ")"] })] }));
}
exports.default = Checkbox;
//# sourceMappingURL=checkbox.js.map