import { Switch } from '@/components/ui/switch';

type ActiveStatusSwitchProps = {
    isActive: boolean;
    onChange: (isActive: boolean) => void;
    disabled?: boolean;
};

export function ActiveStatusSwitch({
    isActive,
    onChange,
    disabled,
}: ActiveStatusSwitchProps) {
    return (
        <div className="flex items-center gap-2">
            <Switch
                checked={isActive}
                onCheckedChange={onChange}
                disabled={disabled}
            />
            <span className="text-sm text-muted-foreground">
                {isActive ? 'Aktif' : 'Nonaktif'}
            </span>
        </div>
    );
}
