"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Switch = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const Typography_1 = require("../Typography");
const styles_1 = require("./styles");
exports.Switch = (0, react_1.forwardRef)(({ label, labelPlacement, ...restProps }, ref) => {
    if (label) {
        return ((0, jsx_runtime_1.jsx)(styles_1.StyledFormControlLabel, { control: (0, jsx_runtime_1.jsx)(styles_1.StyledSwitch, { ref: ref, ...restProps }), label: (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "body1", component: "span", children: label }), labelPlacement: labelPlacement }));
    }
    return (0, jsx_runtime_1.jsx)(styles_1.StyledSwitch, { ref: ref, ...restProps });
});
