import { alias } from "@blitzkit/core"; import type { GunDefinition } from "@blitzkit/protos"; import { useStrings } from "../../hooks/useStrings"; import { useUnwrapper } from "../../hooks/useUnwrapper"; import { IconButton } from "../IconButton"; import { LoadoutSection } from "../LoadoutSection"; import { Tooltip } from "../Tooltip"; import styles from "./index.module.css"; interface LoadoutShellsProps { gun: GunDefinition; selected: number; onSelect: (id: number) => void; } export function LoadoutShells({ gun, selected, onSelect }: LoadoutShellsProps) { const strings = useStrings(); const unwrap = useUnwrapper(); return (
{gun.shells.map((candidate) => { const isSelected = candidate.id === selected; const name = unwrap(candidate.name!); return ( onSelect(candidate.id)} > {name} ); })}
); }