import clsx from "clsx"; import { useTranslation } from "react-i18next"; import type { TierName } from "~/features/mmr/mmr-constants"; import type { MainWeaponId, ModeShort, StageId } from "~/modules/in-game-lists"; import { TIER_PLUS_URL, mainWeaponImageUrl, modeImageUrl, outlinedFiveStarMainWeaponImageUrl, outlinedMainWeaponImageUrl, stageImageUrl, tierImageUrl, } from "~/utils/urls"; interface ImageProps { path: string; alt: string; title?: string; className?: string; containerClassName?: string; width?: number; height?: number; size?: number; style?: React.CSSProperties; containerStyle?: React.CSSProperties; testId?: string; onClick?: () => void; loading?: "lazy"; } export function Image({ path, alt, title, className, width, height, size, style, testId, containerClassName, containerStyle, onClick, loading, }: ImageProps) { return ( ); } type WeaponImageProps = { weaponSplId: MainWeaponId; variant: "badge" | "badge-5-star" | "build"; } & Omit; export function WeaponImage({ weaponSplId, variant, testId, title, ...rest }: WeaponImageProps) { const { t } = useTranslation(["weapons"]); return ( ); } type ModeImageProps = { mode: ModeShort; } & Omit; export function ModeImage({ mode, testId, title, ...rest }: ModeImageProps) { const { t } = useTranslation(["game-misc"]); return ( ); } type StageImageProps = { stageId: StageId; } & Omit; export function StageImage({ stageId, testId, ...rest }: StageImageProps) { const { t } = useTranslation(["game-misc"]); return ( ); } type TierImageProps = { tier: { name: TierName; isPlus: boolean }; } & Omit; export function TierImage({ tier, className, width = 200 }: TierImageProps) { const title = `${tier.name}${tier.isPlus ? "+" : ""}`; const height = width * 0.8675; return ( {tier.isPlus ? ( ) : null} ); }