import type { FC } from "react"; import { BasketIcon } from "./svg/BasketIcon"; import { CarIcon } from "./svg/CarIcon"; import { CashWithdrawalIcon } from "./svg/CashWithdrawalIcon"; import { CoffeeIcon } from "./svg/CoffeeIcon"; import { DepositIcon } from "./svg/DepositIcon"; import { DiceIcon } from "./svg/DiceIcon"; import { DownloadIcon } from "./svg/DownloadIcon"; import { EducationIcon } from "./svg/EducationIcon"; import { GridIcon } from "./svg/GridIcon"; import { GrowthIcon } from "./svg/GrowthIcon"; import { HomeIcon } from "./svg/HomeIcon"; import { MedicalIcon } from "./svg/MedicalIcon"; import { MusicIcon } from "./svg/MusicIcon"; import { RefundIcon } from "./svg/RefundIcon"; import { RepaymentIcon } from "./svg/RepaymentIcon"; import { ServerIcon } from "./svg/ServerIcon"; import { ShieldIcon } from "./svg/ShieldIcon"; import { ShoppingIcon } from "./svg/ShoppingIcon"; import { SmokingIcon } from "./svg/SmokingIcon"; import { SubscriptionsIcon } from "./svg/SubscriptionsIcon"; import { TaxiIcon } from "./svg/TaxiIcon"; import { TopupIcon } from "./svg/TopupIcon"; import { TransferIcon } from "./svg/TransferIcon"; import { TravelIcon } from "./svg/TravelIcon"; import { WifiIcon } from "./svg/WifiIcon"; import { WineIcon } from "./svg/WineIcon"; const icons = { basket: BasketIcon, car: CarIcon, cashWithdrawal: CashWithdrawalIcon, coffee: CoffeeIcon, deposit: DepositIcon, dice: DiceIcon, download: DownloadIcon, education: EducationIcon, grid: GridIcon, growth: GrowthIcon, home: HomeIcon, medical: MedicalIcon, music: MusicIcon, refund: RefundIcon, repayment: RepaymentIcon, server: ServerIcon, shield: ShieldIcon, shopping: ShoppingIcon, smoking: SmokingIcon, subscriptions: SubscriptionsIcon, taxi: TaxiIcon, topup: TopupIcon, transfer: TransferIcon, travel: TravelIcon, wifi: WifiIcon, wine: WineIcon, }; type OperationIconProps = { color: string; variant: keyof typeof icons; }; const OperationIcon: FC = (props) => { const { color, variant } = props; // eslint-disable-next-line security/detect-object-injection -- Variant is a closed key of the static icon registry. const Icon = icons[variant]; return ; }; export { OperationIcon, type OperationIconProps };