import { memo } from 'react' import { GrAddCircle, GrSubtractCircle } from 'react-icons/gr' import { useInputActionsEvents } from '../hooks/input-actions-events' import { ActionsSelectInput } from '../select/actions-input' import { Button } from '../buttons' function InputActionsEventsComponent({ updateFormEvents, path, }: { path: string updateFormEvents?: (a: any) => void }) { const { customFields, removeFormField, addFormField, updateFormField } = useInputActionsEvents() if (path) { return (
{customFields?.map((_item: any, index: number) => { const onStandardChange = (value: string) => { updateFormField(value, index, 'events') // use events setting here if (updateFormEvents) { updateFormEvents(customFields.map((item) => item.events)) } } return (
{customFields.length > 1 ? ( ) : null} {index === customFields.length - 1 ? ( ) : null}
) })}
) } return null } export const InputActionsEvents = memo(InputActionsEventsComponent)