"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UIToggleControl = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
function UIToggleControl(props) {
    const [toggledOn, setToggled] = (0, react_1.useState)(false);
    (0, react_1.useEffect)(() => {
        setToggled(props.startToggled);
    }, [props.startToggled]);
    return (0, jsx_runtime_1.jsx)("div", { onClick: () => setToggled(!toggledOn), children: props.renderControl(toggledOn) });
}
exports.UIToggleControl = UIToggleControl;
//# sourceMappingURL=UIToggleControl.js.map