import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2022-2025 GoodData Corporation
import cx from "classnames";
import { Bubble } from "../../../../Bubble/Bubble.js";
import { BubbleHoverTrigger } from "../../../../Bubble/BubbleHoverTrigger.js";
const alignPoints = [{ align: "cr cl" }];
export function ToggleSwitch({ id, label, checked, disabled, questionMarkMessage, className, onChange, }) {
    const css = cx("toggle-wrapper-revers-label", className);
    return (_jsxs("div", { className: css, children: [
            _jsxs("label", { className: "input-checkbox-toggle s-checkbox-toggle-label", children: [
                    _jsx("input", { type: "checkbox", className: className, id: id, name: id, checked: checked, onChange: onChange, disabled: disabled }), _jsx("span", { className: "input-label-text toggle-switch" })
                ] }), _jsx("label", { className: "toggle-switch-title", htmlFor: label, children: label }), questionMarkMessage ? (_jsxs(BubbleHoverTrigger, { children: [
                    _jsx("span", { className: "gd-icon-circle-question s-circle_question toggle-switch-icon" }), _jsx(Bubble, { alignPoints: alignPoints, children: questionMarkMessage })
                ] })) : null] }));
}
