1 import React from 'react';
3 import CountDisplay from './CountDisplay';
4 import ToggleIcon from './ToggleIcon';
7 getDungeonRemainingItems,
9 } from '../../helpers/tracker';
10 import { useTracker } from '../../hooks/tracker';
12 const Dungeons = () => {
13 const { config, dungeons, state } = useTracker();
15 return <div className="dungeons">
16 {dungeons.map(dungeon =>
17 <div className={`dungeon dungeon-${dungeon.id}`} key={dungeon.id}>
18 <span className="dungeon-tag">{dungeon.id.toUpperCase()}</span>
19 {shouldShowDungeonItem(config, 'Map') ?
21 controller={ToggleIcon.dungeonController(dungeon)}
25 {shouldShowDungeonItem(config, 'Compass') ?
27 controller={ToggleIcon.dungeonController(dungeon)}
31 {shouldShowDungeonItem(config, 'Small') ?
32 <span className="dungeon-smalls">
34 controller={ToggleIcon.dungeonCountController(dungeon, dungeon.sk)}
38 count={getDungeonAcquiredSKs(state, dungeon)}
43 {shouldShowDungeonItem(config, 'Big') ?
45 controller={ToggleIcon.dungeonController(dungeon)}
49 <span className="dungeon-checks">
51 controller={ToggleIcon.dungeonCheckController(dungeon)}
52 icons={['open-chest', 'chest']}
54 <CountDisplay count={getDungeonRemainingItems(state, dungeon)} />
58 controller={ToggleIcon.dungeonBossController(dungeon)}
59 icons={dungeon.bosses}
64 controller={ToggleIcon.dungeonPrizeController(dungeon)}
78 export default Dungeons;