import { multiline } from 'common/string';
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, Grid, Section, Table, Tooltip } from '../components';
export const ComputerFabricator = props => {
const { state } = props;
const { act, data } = useBackend(props);
return (
Your perfect device, only three steps away...
{data.state !== 0 && (
);
};
// This had a pretty gross backend so this was unfortunately one of the
// best ways of doing it.
const CFScreen = props => {
const { act, data } = useBackend(props);
if (data.state === 0) {
return (
Choose your Device
);
}
if (data.state === 1) {
return (
{data.totalprice} cr
)}>
Battery:
Hard Drive:
Network Card:
Nano Printer:
Card Reader:
{data.devtype !== 2 && (
Processor Unit:
Tesla Relay:
)}
);
}
if (data.state === 2) {
return (
Your device is ready for fabrication...
Please insert the required
{' '}
{data.totalprice} cr
Current:
= data.totalprice ? "good" : "bad"}>
{data.credits} cr
);
}
if (data.state === 3) {
return (
Thank you for your purchase!
If you experience any difficulties with your new device, please
contact your local network administrator.
);
}
return null;
};