import { BeanType, CombinationType, FactType, ItemService, ItemType, RecipeType, TypesOfItems, } from "@/entities/item"; import { BeanCard } from "./beanCard"; import React from "react"; import { FactCard } from "./factCard"; import { RecipeCard } from "./recipeCard"; import { CombinationCard } from "./combinationCard"; import { MileStoneCard } from "./mileStoneCard"; import { MileStoneType } from "@/entities/item/mileStones"; const ItemTypeToCard = ( item: ItemType, ref: React.ForwardedRef ) => { return { [TypesOfItems.bean]: , [TypesOfItems.fact]: , [TypesOfItems.recipe]: , [TypesOfItems.combination]: ( ), [TypesOfItems.mileStone]: ( ), }[ItemService.GetTypeOfItem(item)]; }; export const ItemCard = React.forwardRef( ({ item }, ref) => { return ItemTypeToCard(item, ref); } ); ItemCard.displayName = "ItemCard";