import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, ProgressBar, NoticeBox, Section } from '../components';
import { Window } from '../layouts';
export const RoboticsControlConsole = (props, context) => {
const { act, data } = useBackend(context);
const { can_hack, safety, show_detonate_all, cyborgs = [] } = data;
return (
{!!show_detonate_all && (
)}
);
};
const Cyborgs = (props, context) => {
const { cyborgs, can_hack } = props;
const { act, data } = useBackend(context);
if (!cyborgs.length) {
return No cyborg units detected within access parameters.;
}
return cyborgs.map((cyborg) => {
return (
{!!cyborg.hackable && !cyborg.emagged && (
act('hackbot', {
ref: cyborg.ref,
})
}
/>
)}
act('stopbot', {
ref: cyborg.ref,
})
}
/>
act('killbot', {
ref: cyborg.ref,
})
}
/>
}>
{cyborg.status ? 'Not Responding' : cyborg.locked_down ? 'Locked Down' : 'Nominal'}
{cyborg.locstring}
50 ? 'good' : 'bad'} value={cyborg.health / 100} />
{(typeof cyborg.charge === 'number' && (
30 ? 'good' : 'bad'} value={cyborg.charge / 100} />
{cyborg.cell_capacity}
)) || (
No Power Cell
)}
{!!cyborg.is_hacked && (
DISABLED
)}
{cyborg.module}
{cyborg.synchronization || 'None'}
);
});
};