const preact = require('preact');
const { ITEMS: { SKILLS, SPECS, COLOURS } } = require('./constants');
function Info(args) {
const {
info,
sendUnequip,
} = args;
if (!info.length) return (
);
const [type, value] = info;
if (type === 'item') {
return (
{info.value} - what does it do?
);
}
if (type === 'skill') {
return (
{value.skill}
{SKILLS[value.skill].description}
);
}
if (type === 'spec') {
return (
{value.spec}
{SPECS[value.spec].description}
);
}
if (type === 'cryp') {
const stats = [
{ stat: 'hp', disp: 'Hp', colour: '#1FF01F' },
{ stat: 'red_shield', disp: 'Red Shield', colour: '#a52a2a' },
{ stat: 'blue_shield', disp: 'Blue Shield', colour: '#3498db' },
{ stat: 'red_damage', disp: 'Red Damage', colour: '#a52a2a' },
{ stat: 'blue_damage', disp: 'Blue Damage', colour: '#3498db' },
{ stat: 'green_damage', disp: 'Green Damage', colour: '#1FF01F' },
{ stat: 'speed', disp: 'Speed', colour: '#FFD123' },
].map((s, i) => (
{s.disp}: {value[s.stat].base} - {value[s.stat].max}
));
const cryp = value;
const skills = cryp.skills.map((s, i) => );
const specs = cryp.specs.map((s, i) => );
return (
{cryp.name}
{stats}
{skills}
{specs}
);
}
}
module.exports = Info;