e.pointerType === "mouse" && later(() => setOpen(true), OPEN_DELAY)
}
onPointerLeave={(e) =>
e.pointerType === "mouse" && later(() => setOpen(false), CLOSE_DELAY)
}
onKeyDown={onKey}
>
{open && (
)}
{
if (e.pointerType === "mouse") return;
held.current = false;
later(() => {
held.current = true;
setOpen(true);
}, 420);
}}
onPointerUp={(e) =>
e.pointerType !== "mouse" &&
!held.current &&
window.clearTimeout(timer.current)
}
onContextMenu={(e) => e.preventDefault()}
whileTap={still ? undefined : { scale: 0.94 }}
className={cn(
"relative flex h-11 w-full cursor-pointer select-none items-center justify-center gap-2 rounded-full text-sm font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-zinc-400 [-webkit-touch-callout:none]",
(mode === "pick" && current) ||
(mode === "add" && count > 0 && current)
? "bg-zinc-200/80 text-zinc-900 dark:bg-white/12 dark:text-zinc-100"
: "bg-zinc-100 text-zinc-600 hover:bg-zinc-200/70 hover:text-zinc-900 dark:bg-white/6 dark:text-zinc-300 dark:hover:bg-white/10",
)}
>
{mode === "pick" && current ? current.emoji : rest}
{burst && }
{floats.map((f) => (
setFloats((all) => all.filter((x) => x.n !== f.n))
}
>
{f.text}
))}
);
}
export const ReactionCard = React.forwardRef