1 import React from 'react';
3 import ToggleIcon from './ToggleIcon';
4 import { BOTTLE_CONTENTS } from '../../helpers/tracker';
5 import { useTracker } from '../../hooks/tracker';
7 const transform = (x, y, s) => `translate(${x * 0.2} ${y * 0.2}) scale(${(s || 0.85) * 0.2})`;
10 const { state } = useTracker();
13 <g transform={transform(0.5, 0.5)}>
14 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bow', 'silvers']} svg />
16 <g transform={transform(1.35, 0.5)}>
17 <ToggleIcon controller={ToggleIcon.simpleController} icons={['blue-boomerang']} svg />
19 <g transform={transform(1.85, 0.5)}>
20 <ToggleIcon controller={ToggleIcon.simpleController} icons={['red-boomerang']} svg />
22 <g transform={transform(2.5, 0.5)}>
23 <ToggleIcon controller={ToggleIcon.simpleController} icons={['hookshot']} svg />
25 <g transform={transform(3.5, 0.5)}>
26 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bomb']} svg />
28 <g transform={transform(4.5, 0.5)}>
29 <ToggleIcon controller={ToggleIcon.simpleController} icons={['powder']} svg />
31 <g transform={transform(0.5, 1.5)}>
32 <ToggleIcon controller={ToggleIcon.simpleController} icons={['fire-rod']} svg />
34 <g transform={transform(1.5, 1.5)}>
35 <ToggleIcon controller={ToggleIcon.simpleController} icons={['ice-rod']} svg />
37 <g transform={transform(2.5, 1.5)}>
38 <ToggleIcon controller={ToggleIcon.medallionController} icons={['bombos']} svg />
39 {state['mm-medallion'] === 'bombos' ?
40 <text className="med-display bottom-left">MM</text>
42 {state['tr-medallion'] === 'bombos' ?
43 <text className="med-display bottom-right">TR</text>
46 <g transform={transform(3.5, 1.5)}>
47 <ToggleIcon controller={ToggleIcon.medallionController} icons={['ether']} svg />
48 {state['mm-medallion'] === 'ether' ?
49 <text className="med-display bottom-left">MM</text>
51 {state['tr-medallion'] === 'ether' ?
52 <text className="med-display bottom-right">TR</text>
55 <g transform={transform(4.5, 1.5)}>
56 <ToggleIcon controller={ToggleIcon.medallionController} icons={['quake']} svg />
57 {state['mm-medallion'] === 'quake' ?
58 <text className="med-display bottom-left">MM</text>
60 {state['tr-medallion'] === 'quake' ?
61 <text className="med-display bottom-right">TR</text>
64 <g transform={transform(0.5, 2.5)}>
65 <ToggleIcon controller={ToggleIcon.simpleController} icons={['lamp']} svg />
67 <g transform={transform(1.5, 2.5)}>
68 <ToggleIcon controller={ToggleIcon.simpleController} icons={['hammer']} svg />
70 <g transform={transform(2.5, 2.5)}>
71 <ToggleIcon controller={ToggleIcon.simpleController} icons={['flute']} svg />
73 <g transform={transform(2.75, 2.75, 0.5)}>
74 <ToggleIcon controller={ToggleIcon.simpleController} icons={['duck']} svg />
76 <g transform={transform(3.5, 2.5)}>
77 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bugnet']} svg />
79 <g transform={transform(4.5, 2.5)}>
80 <ToggleIcon controller={ToggleIcon.simpleController} icons={['book']} svg />
82 <g transform={transform(0.5, 3.5)}>
83 <ToggleIcon controller={ToggleIcon.simpleController} icons={['shovel']} svg />
85 <g transform={transform(1.5, 3.5)}>
86 <ToggleIcon controller={ToggleIcon.simpleController} icons={['somaria']} svg />
88 <g transform={transform(2.5, 3.5)}>
89 <ToggleIcon controller={ToggleIcon.simpleController} icons={['byrna']} svg />
91 <g transform={transform(3.5, 3.5)}>
92 <ToggleIcon controller={ToggleIcon.simpleController} icons={['cape']} svg />
94 <g transform={transform(4.5, 3.5)}>
95 <ToggleIcon controller={ToggleIcon.simpleController} icons={['mirror']} svg />
97 <g transform={transform(0.5, 5)}>
99 controller={ToggleIcon.bottleController('bottle-1')}
100 icons={BOTTLE_CONTENTS}
104 <g transform={transform(1.5, 5)}>
106 controller={ToggleIcon.bottleController('bottle-2')}
107 icons={BOTTLE_CONTENTS}
111 <g transform={transform(2.5, 5)}>
113 controller={ToggleIcon.bottleController('bottle-3')}
114 icons={BOTTLE_CONTENTS}
118 <g transform={transform(3.5, 5)}>
120 controller={ToggleIcon.bottleController('bottle-4')}
121 icons={BOTTLE_CONTENTS}
125 <g transform={transform(4.5, 5)}>
126 <ToggleIcon controller={ToggleIcon.simpleController} icons={['mushroom']} svg />
128 <g transform={transform(0.5, 6.5)}>
129 <ToggleIcon controller={ToggleIcon.simpleController} icons={['boots']} svg />
131 <g transform={transform(1.5, 6.5)}>
133 controller={ToggleIcon.progressiveController('lift', 0, 2)}
134 icons={['glove', 'mitts']}
138 <g transform={transform(2.5, 6.5)}>
139 <ToggleIcon controller={ToggleIcon.simpleController} icons={['flippers']} svg />
141 <g transform={transform(3.5, 6.5)}>
142 <ToggleIcon controller={ToggleIcon.simpleController} icons={['moonpearl']} svg />
144 <g transform={transform(4.5, 6.5)}>
146 controller={ToggleIcon.simpleController}
147 icons={['half-magic', 'quarter-magic']}
151 <g transform={transform(0.5, 7.5)}>
153 controller={ToggleIcon.progressiveController('sword', 0, 4)}
154 icons={['sword-1', 'sword-2', 'sword-3', 'sword-4']}
158 <g transform={transform(1.5, 7.5)}>
160 controller={ToggleIcon.progressiveController('shield', 0, 3)}
161 icons={['fighter-shield', 'fire-shield', 'mirror-shield']}
165 <g transform={transform(2.5, 7.5)}>
167 controller={ToggleIcon.progressiveController('mail', 1, 3)}
168 icons={['green-mail', 'blue-mail', 'red-mail']}
172 <g transform={transform(3.5, 7.5)}>
174 controller={ToggleIcon.modulusController('heart-piece')}
175 icons={['heart-0', 'heart-1', 'heart-2', 'heart-3']}
182 export default Items;