"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Switch;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_1 = require("react");
function Switch({ checked, id, onClick, text, }) {
    const buttonId = (0, react_1.useMemo)(() => 'id_' + Math.floor(Math.random() * 10000), []);
    return (React.createElement("div", { className: 'switch', id: id },
        React.createElement("label", { htmlFor: buttonId }, text),
        React.createElement("button", { "aria-checked": checked, id: buttonId, onClick: onClick, role: 'switch', type: 'button' },
            React.createElement("span", null))));
}
//# sourceMappingURL=Switch.js.map