import { jsxs as _jsxs } from "react/jsx-runtime";
import { cnb } from "cnbuilder";
import { forwardRef } from "react";
import { bem } from "../utils/bem.js";
const styles = bem("rmd-switch");
/**
 * **Server Component**
 */ export const SwitchTrack = /*#__PURE__*/ forwardRef(function SwitchTrack(props, ref) {
    const { style, className, ballAddon, ballProps, ballStyle, ballClassName, active, children, disabled = false, ...remaining } = props;
    return /*#__PURE__*/ _jsxs("div", {
        ...remaining,
        ref: ref,
        style: style,
        className: cnb(styles("track", {
            disabled
        }), className),
        children: [
            children,
            /*#__PURE__*/ _jsxs("span", {
                style: ballStyle,
                ...ballProps,
                className: cnb(styles("ball", {
                    active
                }), ballClassName),
                children: [
                    ballAddon,
                    ballProps?.children
                ]
            })
        ]
    });
});

//# sourceMappingURL=SwitchTrack.js.map