'use client' import React from 'react' import styles from './styles.module.css' import { getGlobalStyle } from '../../../helpers' import { Icon } from '../../atoms' interface ToggleSwitchProps { checked: boolean id?: string disabled?: boolean label?: string name?: string style?: React.CSSProperties successColor?: 'green' | 'red' | 'white' iconLeft?: string iconRight?: string onChange: (checked: boolean) => void } /** * ToggleSwitch * Animated toggle switch with optional icons and smooth transitions */ export const ToggleSwitch: React.FC = ({ checked, id = 'toggle-switch', disabled = false, label = '', name = '', style, successColor = 'red', iconLeft, iconRight, onChange }) => { const colors = { green: getGlobalStyle('--color-text-success'), red: getGlobalStyle('--color-background-primary'), white: getGlobalStyle('--color-icons-white') } as const return (
{label && ( )}
) }