import styles from "./styles.module.scss";

interface IToggleSwitchProps {
  isOn: boolean;
  onToggle: () => void;
}

const ToggleSwitch = ({ isOn, onToggle }: IToggleSwitchProps) => {
  return (
    <div
      className={`${styles["toggle-switch"]} ${isOn ? styles.on : ""}`}
      onClick={onToggle}
    >
      <div className={styles["toggle-handle"]}></div>
    </div>
  );
};

export default ToggleSwitch;
