import { useTranslation } from "~/hooks/useTranslation";
import type { MainWeaponId, ModeShort, StageId } from "~/modules/in-game-lists";
import {
mainWeaponImageUrl,
modeImageUrl,
outlinedMainWeaponImageUrl,
stageImageUrl,
} from "~/utils/urls";
interface ImageProps {
path: string;
alt: string;
title?: string;
className?: string;
containerClassName?: string;
width?: number;
height?: number;
size?: number;
style?: React.CSSProperties;
testId?: string;
onClick?: () => void;
}
export function Image({
path,
alt,
title,
className,
width,
height,
size,
style,
testId,
containerClassName,
onClick,
}: ImageProps) {
return (
);
}
type WeaponImageProps = {
weaponSplId: MainWeaponId;
variant: "badge" | "build";
} & Omit;
export function WeaponImage({
weaponSplId,
variant,
testId,
...rest
}: WeaponImageProps) {
const { t } = useTranslation(["weapons"]);
return (
);
}
type ModeImageProps = {
mode: ModeShort;
} & Omit;
export function ModeImage({ mode, testId, ...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 (
);
}