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} ${y}) scale(${s || 0.85})`;
10 const { state } = useTracker();
13 xmlns="http://www.w3.org/2000/svg"
18 onContextMenu={(e) => {
23 <g transform={transform(0.5, 0.5)}>
24 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bow', 'silvers']} svg />
26 <g transform={transform(1.35, 0.5)}>
27 <ToggleIcon controller={ToggleIcon.simpleController} icons={['blue-boomerang']} svg />
29 <g transform={transform(1.85, 0.5)}>
30 <ToggleIcon controller={ToggleIcon.simpleController} icons={['red-boomerang']} svg />
32 <g transform={transform(2.5, 0.5)}>
33 <ToggleIcon controller={ToggleIcon.simpleController} icons={['hookshot']} svg />
35 <g transform={transform(3.5, 0.5)}>
36 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bomb']} svg />
38 <g transform={transform(4.5, 0.5)}>
39 <ToggleIcon controller={ToggleIcon.simpleController} icons={['powder']} svg />
41 <g transform={transform(0.5, 1.5)}>
42 <ToggleIcon controller={ToggleIcon.simpleController} icons={['fire-rod']} svg />
44 <g transform={transform(1.5, 1.5)}>
45 <ToggleIcon controller={ToggleIcon.simpleController} icons={['ice-rod']} svg />
47 <g transform={transform(2.5, 1.5)}>
48 <ToggleIcon controller={ToggleIcon.medallionController} icons={['bombos']} svg />
49 {state['mm-medallion'] === 'bombos' ?
50 <text className="med-display bottom-left">MM</text>
52 {state['tr-medallion'] === 'bombos' ?
53 <text className="med-display bottom-right">TR</text>
56 <g transform={transform(3.5, 1.5)}>
57 <ToggleIcon controller={ToggleIcon.medallionController} icons={['ether']} svg />
58 {state['mm-medallion'] === 'ether' ?
59 <text className="med-display bottom-left">MM</text>
61 {state['tr-medallion'] === 'ether' ?
62 <text className="med-display bottom-right">TR</text>
65 <g transform={transform(4.5, 1.5)}>
66 <ToggleIcon controller={ToggleIcon.medallionController} icons={['quake']} svg />
67 {state['mm-medallion'] === 'quake' ?
68 <text className="med-display bottom-left">MM</text>
70 {state['tr-medallion'] === 'quake' ?
71 <text className="med-display bottom-right">TR</text>
74 <g transform={transform(0.5, 2.5)}>
75 <ToggleIcon controller={ToggleIcon.simpleController} icons={['lamp']} svg />
77 <g transform={transform(1.5, 2.5)}>
78 <ToggleIcon controller={ToggleIcon.simpleController} icons={['hammer']} svg />
80 <g transform={transform(2.5, 2.5)}>
81 <ToggleIcon controller={ToggleIcon.simpleController} icons={['flute']} svg />
83 <g transform={transform(2.75, 2.75, 0.5)}>
84 <ToggleIcon controller={ToggleIcon.simpleController} icons={['duck']} svg />
86 <g transform={transform(3.5, 2.5)}>
87 <ToggleIcon controller={ToggleIcon.simpleController} icons={['bugnet']} svg />
89 <g transform={transform(4.5, 2.5)}>
90 <ToggleIcon controller={ToggleIcon.simpleController} icons={['book']} svg />
92 <g transform={transform(0.5, 3.5)}>
93 <ToggleIcon controller={ToggleIcon.simpleController} icons={['shovel']} svg />
95 <g transform={transform(1.5, 3.5)}>
96 <ToggleIcon controller={ToggleIcon.simpleController} icons={['somaria']} svg />
98 <g transform={transform(2.5, 3.5)}>
99 <ToggleIcon controller={ToggleIcon.simpleController} icons={['byrna']} svg />
101 <g transform={transform(3.5, 3.5)}>
102 <ToggleIcon controller={ToggleIcon.simpleController} icons={['cape']} svg />
104 <g transform={transform(4.5, 3.5)}>
105 <ToggleIcon controller={ToggleIcon.simpleController} icons={['mirror']} svg />
107 <g transform={transform(0.5, 5)}>
109 controller={ToggleIcon.bottleController('bottle-1')}
110 icons={BOTTLE_CONTENTS}
114 <g transform={transform(1.5, 5)}>
116 controller={ToggleIcon.bottleController('bottle-2')}
117 icons={BOTTLE_CONTENTS}
121 <g transform={transform(2.5, 5)}>
123 controller={ToggleIcon.bottleController('bottle-3')}
124 icons={BOTTLE_CONTENTS}
128 <g transform={transform(3.5, 5)}>
130 controller={ToggleIcon.bottleController('bottle-4')}
131 icons={BOTTLE_CONTENTS}
135 <g transform={transform(4.5, 5)}>
136 <ToggleIcon controller={ToggleIcon.simpleController} icons={['mushroom']} svg />
138 <g transform={transform(0.5, 6.5)}>
139 <ToggleIcon controller={ToggleIcon.simpleController} icons={['boots']} svg />
141 <g transform={transform(1.5, 6.5)}>
143 controller={ToggleIcon.progressiveController('lift', 0, 2)}
144 icons={['glove', 'mitts']}
148 <g transform={transform(2.5, 6.5)}>
149 <ToggleIcon controller={ToggleIcon.simpleController} icons={['flippers']} svg />
151 <g transform={transform(3.5, 6.5)}>
152 <ToggleIcon controller={ToggleIcon.simpleController} icons={['moonpearl']} svg />
154 <g transform={transform(4.5, 6.5)}>
156 controller={ToggleIcon.simpleController}
157 icons={['half-magic', 'quarter-magic']}
161 <g transform={transform(0.5, 7.5)}>
163 controller={ToggleIcon.progressiveController('sword', 0, 4)}
164 icons={['sword-1', 'sword-2', 'sword-3', 'sword-4']}
168 <g transform={transform(1.5, 7.5)}>
170 controller={ToggleIcon.progressiveController('shield', 0, 3)}
171 icons={['fighter-shield', 'fire-shield', 'mirror-shield']}
175 <g transform={transform(2.5, 7.5)}>
177 controller={ToggleIcon.progressiveController('mail', 1, 3)}
178 icons={['green-mail', 'blue-mail', 'red-mail']}
182 <g transform={transform(3.5, 7.5)}>
184 controller={ToggleIcon.modulusController('heart-piece')}
185 icons={['heart-0', 'heart-1', 'heart-2', 'heart-3']}
192 export default Items;