"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PropertyEditorBoolean = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const material_1 = require("@mui/material");
const UILabel_1 = require("../BuildlingBlocks/UILabel");
const UISwitch_1 = require("../BuildlingBlocks/UISwitch");
const PropertyEditorBoolean = (props) => {
    const onChange = (val) => {
        Reflect.set(props.editObject, props.propertyName, val);
        props.updateCallback();
    };
    return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", flexDirection: "row", justifyContent: "space-between", children: [props.label && (0, jsx_runtime_1.jsx)(UILabel_1.UILabel, { children: props.label }), (0, jsx_runtime_1.jsx)(UISwitch_1.UISwitch, { checked: Reflect.get(props.editObject, props.propertyName) || false, onSet: onChange })] }));
};
exports.PropertyEditorBoolean = PropertyEditorBoolean;
//# sourceMappingURL=PropertyEditorBoolean.js.map