import { Fragment } from 'inferno'; import { useBackend } from '../backend'; import { Box, Button, Flex, LabeledList, Section } from '../components'; import { Window } from '../layouts'; import { decodeHtmlEntities } from 'common/string'; import { formatPower } from '../format'; export const ICCircuit = (props, context) => { const { act, data } = useBackend(context); const { name, desc, displayed_name, removable, complexity, power_draw_idle, power_draw_per_use, extended_desc, inputs, outputs, activators, } = data; return (
}> {complexity} {(power_draw_idle && ( {formatPower(power_draw_idle)} )) || null} {(power_draw_per_use && ( {formatPower(power_draw_per_use)} )) || null} {extended_desc}
{(inputs.length && (
)) || null}
{desc}
{(outputs.length && (
)) || null}
{activators.map((activator) => ( ))}
); }; const ICIODisplay = (props, context) => { const { act } = useBackend(context); const { list } = props; return list.map((iopin) => ( )); }; const ICLinkDisplay = (props, context) => { const { act } = useBackend(context); const { pin } = props; return pin.linked.map((link) => ( )); };