import * as React from "react"; import { pushStep } from "./actions"; import { Help } from "../help"; import { UnplacedStep, StepCommand as Command, messageType } from "./interfaces"; let addStep = (dispatch: Function) => (step: UnplacedStep) => (event: React.FormEvent) => { dispatch(pushStep(step)); }; let step = function(message_type: messageType, command: Command = {}): UnplacedStep { return { message_type, command }; }; export function StepButtonGroup({dispatch}: {dispatch: Function}) { let clickToAdd = addStep(dispatch); // TODO Farmbot does not natively support an "EXECUTE" (unconditional jmp) // command. For now we're sneakily making it an if_statement that is always // true. let temporaryHack = clickToAdd({ message_type: "if_statement", command: {} }); return (
{("Commands")}
{(`These commands are the most basic things FarmBot can do. Combine them into sequences to create more complex operations for watering, planting seeds, measuring soil properties, and more. Coming soon: drag and drop commands!`)}
); }