import { BooleanLike } from 'common/react'; import { useBackend } from '../backend'; import { Button, LabeledList, Section } from '../components'; import { Window } from '../layouts'; type Data = { slots: { name: string; item: string; act: string }[]; internalsValid: BooleanLike; }; export const InventoryPanel = (props, context) => { const { act, data } = useBackend(context); const { slots, internalsValid } = data; return (
{slots && slots.length && slots.map((slot) => ( ))}
{(internalsValid && ( /* Remove if more actions are added */
{(internalsValid && ( )) || null}
)) || null}
); };