import React, { ReactNode } from 'react'; import { cn } from '@/utils/cn'; interface ToggleGroupItemProps { value: string; isSelected: boolean; onClick: () => void; children: ReactNode; } export const ToggleGroupItem: React.FC = ({ value, isSelected, onClick, children }) => { return ( ); }; interface ToggleGroupProps { label: string; helpText?: string; noOptionsText?: string; values: string[]; options: { value: string; label: string }[]; onChange: (values: string[]) => void; className?: string; } export const ToggleGroup: React.FC = ({ label, helpText, noOptionsText = "No options available", values, options, onChange, className }) => { const handleToggle = (value: string) => { const isSelected = values.includes(value); if (isSelected) { onChange(values.filter(v => v !== value)); } else { onChange([...values, value]); } }; return (
{options.length === 0 ? (

{noOptionsText}

) : (
{options.map(option => ( handleToggle(option.value)} > {option.label} ))}
)}
{helpText && (

{helpText}

)}
); }; interface SwitchProps { checked: boolean; onCheckedChange: (checked: boolean) => void; disabled?: boolean; } export const Switch: React.FC = ({ checked, onCheckedChange, disabled = false }) => { return ( ); };