import React, { useState } from "react";
import uuidv4 from "uuid-random";
import "./css/toggle.css";
export const FinsembleToggle = ({ checked, onChange, label, enabled = true }) => {
    const [id] = useState(uuidv4());
    return (React.createElement("span", { className: ["finsembleToggle", checked ? "finsembleToggle-on" : "finsembleToggle-off"].join(" ") },
        React.createElement("input", { type: "checkbox", id: id, checked: checked, onChange: () => {
                onChange(!checked);
            }, disabled: !enabled }),
        React.createElement("label", { htmlFor: id }, label)));
};
//# sourceMappingURL=FinsembleToggle.js.map