'use client' import Button from './Button' import Image from 'next/image' type MiniCardProps = { title: string avatar: string steamId: string selected?: boolean onSelect?: (steamId: string) => void onKick?: (steamId: string) => void isLeader?: boolean draggable?: boolean currentUserSteamId: string teamLeaderSteamId: string location?: string dragListeners?: any hoverEffect?: boolean onPromote?: (steamId: string) => void hideActions?: boolean hideOverlay?: boolean } export default function MiniCard({ title, avatar, steamId, selected, onSelect, onKick, isLeader = false, draggable, currentUserSteamId, teamLeaderSteamId, location, dragListeners, hoverEffect = false, onPromote, hideActions = false, hideOverlay = false, }: MiniCardProps) { const isSelectable = typeof onSelect === 'function' const canKick = currentUserSteamId === teamLeaderSteamId && steamId !== teamLeaderSteamId const cardClasses = ` relative flex flex-col items-center p-4 border rounded-lg transition max-h-[154px] w-full overflow-hidden bg-white dark:bg-neutral-800 border shadow-2xs rounded-xl ${selected ? 'ring-1 ring-blue-500 border-blue-500 dark:ring-blue-400' : 'border-gray-200 dark:border-neutral-700'} ${hoverEffect ? 'hover:cursor-grab hover:scale-105' : ''} ${isSelectable ? 'hover:border-blue-400 dark:hover:border-blue-400 cursor-pointer' : ''} ` const avatarWrapper = 'relative w-16 h-16 mb-2' const handleCardClick = () => { if (isSelectable) onSelect?.(steamId) } const handleKickClick = (e: React.MouseEvent) => { onKick?.(steamId) } const handlePromoteClick = (e: React.MouseEvent) => { onPromote?.(steamId) } const stopDrag = (e: React.PointerEvent | React.MouseEvent) => { e.stopPropagation() } return (