import React from 'react'; import { Brain, Coins, Pizza, X, StopCircle } from 'lucide-react'; import { Pet } from '../../types/Pet'; import { formatResourceName, getResourceFromAction } from '../../utils/petUtils'; interface ResourceSelectionModalProps { isOpen: boolean; onClose: () => void; onGather: (resourceType: string) => void; pet: Pet; isGathering: boolean; } interface ResourceOption { type: string; name: string; icon: React.ElementType; formula: string; stat: keyof typeof statMultipliers; color: string; } const statMultipliers = { intelligence: 2, strength: 3, charisma: 1.5, }; const resourceOptions: ResourceOption[] = [ { type: 'wisdom', name: 'Wisdom', icon: Brain, formula: 'Intelligence × 2', stat: 'intelligence', color: 'purple', }, { type: 'gold', name: 'Gold', icon: Coins, formula: 'Strength × 3', stat: 'strength', color: 'yellow', }, { type: 'food', name: 'Food', icon: Pizza, formula: 'Charisma × 1.5', stat: 'charisma', color: 'green', }, ]; export default function ResourceSelectionModal({ isOpen, onClose, onGather, pet, isGathering, }: ResourceSelectionModalProps) { if (!isOpen) return null; const calculateEstimatedYield = (option: ResourceOption) => { const baseStat = pet.stats[option.stat]; const multiplier = statMultipliers[option.stat]; return Math.floor(baseStat * multiplier); }; const currentResource = getResourceFromAction(pet.petGatherAction); return (

Gather Resources

{isGathering && currentResource && (

Currently gathering {formatResourceName(currentResource)}

)}
{resourceOptions.map((option) => ( ))}
{isGathering && ( )}
); }