import InputNumber from "components/Inputs/InputNumber"; import InputYaml from "components/Inputs/InputYaml"; import { RepeatAction } from "types/automations/actions"; import { OptionManager, updateActionData } from './OptionManager'; export const ActionRepeatState: OptionManager = { defaultState: () => ({ alias: "Repeat", repeat: { count: 1, sequence: [], } }), isReady: ({ alias, repeat, }) => ( alias !== '' && repeat?.sequence.length > 0 ), renderOptionList: (state, setState) => { const update = updateActionData(state, setState); return <> update({ repeat: { ...state.repeat, count } })} /> update({ repeat: { ...state.repeat, sequence } })} /> } }