import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import cx from "classnames";
export function SharedObjectCheckboxControl({ isChecked, isSupported, onChange, name, label, className, }) {
    if (!isSupported) {
        return null;
    }
    const handleOnChange = (e) => onChange(e.target.checked);
    const classNames = cx("input-checkbox-label", className);
    return (_jsxs("label", { className: classNames, children: [
            _jsx("input", { type: "checkbox", name: name, className: "input-checkbox", checked: isChecked, onChange: handleOnChange, "aria-label": name }), _jsx("span", { className: "input-label-text", children: label })
        ] }));
}
