import { jsx as t } from "react/jsx-runtime";
import a from "prop-types";
import { Switch as c, FormControlLabel as e } from "@mui/material";
import { styled as l } from "../Theme/index.js";
const r = l((i) => /* @__PURE__ */ t(c, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: !0, ...i }))(
  ({ theme: i }) => ({
    width: 42,
    height: 26,
    padding: 0,
    "& .MuiSwitch-switchBase": {
      padding: 0,
      margin: 2,
      transitionDuration: "300ms",
      "&.Mui-checked": {
        transform: "translateX(16px)",
        color: "#fff",
        "& + .MuiSwitch-track": {
          backgroundColor: i.palette.primary.main,
          opacity: 1,
          border: 0
        },
        "&.Mui-disabled + .MuiSwitch-track": {
          opacity: 0.5
        }
      },
      "&.Mui-focusVisible .MuiSwitch-thumb": {
        color: i.palette.primary.main,
        border: "6px solid #fff"
      },
      "&.Mui-disabled .MuiSwitch-thumb": {
        color: i.palette.mode === "light" ? i.palette.grey[100] : i.palette.grey[600]
      },
      "&.Mui-disabled + .MuiSwitch-track": {
        opacity: i.palette.mode === "light" ? 0.7 : 0.3
      }
    },
    "& .MuiSwitch-thumb": {
      boxSizing: "border-box",
      width: 22,
      height: 22
    },
    "& .MuiSwitch-track": {
      borderRadius: 26 / 2,
      backgroundColor: i.palette.grey[200],
      opacity: 1,
      transition: i.transitions.create(["background-color"], {
        duration: 500
      })
    }
  })
);
function u({ labelProps: i = null, ...o }) {
  return i ? /* @__PURE__ */ t(e, { control: /* @__PURE__ */ t(r, { ...o }), ...i }) : /* @__PURE__ */ t(r, { ...o });
}
u.propTypes = {
  labelProps: a.object
};
export {
  u as default
};
