setIsDragging(false)}
+ onClick={handleBadgeClick}
+ style={
+ isFloating
+ ? {
+ position: "fixed",
+ left: position ? `${position.x}px` : "12px",
+ top: position ? `${position.y}px` : "12px",
+ zIndex: 99999,
+ touchAction: "none",
+ userSelect: "none",
+ }
+ : undefined
+ }
+ className={[
+ isFloating
+ ? "fixed flex items-center gap-1.5 px-3 py-2 rounded-[15px] backdrop-blur-md shadow-md border select-none transition-shadow cursor-pointer"
+ : "inline-flex items-center gap-1.5 rounded-[15px] px-3 py-2 shadow-md border backdrop-blur-md cursor-pointer",
+ variant === "transparent"
+ ? "bg-black/60 text-white border-white/20 hover:bg-black/70"
+ : "bg-white/95 text-slate-800 border-slate-200/80 hover:bg-white dark:bg-slate-900/95 dark:text-slate-100 dark:border-slate-700/80",
+ isDragging
+ ? "cursor-grabbing shadow-2xl ring-2 ring-rose-500/50 scale-[1.02]"
+ : "cursor-grab active:scale-95",
+ className,
+ ]
+ .filter(Boolean)
+ .join(" ")}
+ title="تغییر توکن کاربر (تست) - برای جابجایی بکشید / برای انتخاب کلیک کنید"
+ >
+ {/* Drag handle */}
+ {isFloating && (
+
+
+
+ )}
+
+ {/* Role icon & selected account label only */}
+
+
{currentRoleLabel}
+
+ );
+
return (
<>
-