import { formatUnits } from "viem"; import { BossLevel, usePlayer } from "../providers/PlayerProvider"; import styles from "../styles/Modal.module.css"; import { bossToReward } from "./BossInfo"; interface BossOutcomeModalProps { setIsOpen: (val: boolean) => void, outcome: boolean, ascended: boolean, bossLevel: BossLevel } const BossOutcomeModal = ({ setIsOpen, outcome, ascended, bossLevel }: BossOutcomeModalProps) => { const text = outcome ? "and you won! 🤩" : "and you lost 😔"; const rewardAmount = parseFloat(parseFloat(formatUnits(bossToReward[bossLevel], 18).toString()).toFixed(4)); const rewardText = ascended ?

You won {rewardAmount} RGCVII and ASCENDED!!!. This means you beat the bosses and gained a Prestige level. Your GELD is now forfeit, but your legend lives on.

: outcome ?

You won {rewardAmount} RGCVII

:

Your GELD is now forfeit. Try again 💪 we know you can do it!

return

You battled a boss

{text}

{rewardText}
} export default BossOutcomeModal