/// import { recipe, UI } from "commontools"; interface Item { price: number; quantity: number; } interface State { items: Item[]; discount: number; taxRate: number; } const shippingCost = 5.99; export default recipe("MultipleCaptures", (state) => { const multiplier = 2; return { [UI]: ( {state.items.map((item) => ( Total: {item.price * item.quantity * state.discount * state.taxRate * multiplier + shippingCost} ))} ), }; });