import { ArrayFieldItemButtonsTemplateProps, buttonId, FormContextType, RJSFSchema, StrictRJSFSchema, } from '@rjsf/utils'; /** The `ArrayFieldTemplateItemButtons` component is the template used to render the buttons associate3d with items of * an array. * * @param props - The `ArrayFieldItemButtonsTemplateProps` props for the component */ export default function ArrayFieldItemButtonsTemplate< T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any, >(props: ArrayFieldItemButtonsTemplateProps) { const { disabled, hasCopy, hasMoveDown, hasMoveUp, hasRemove, fieldPathId, onCopyItem, onRemoveItem, onMoveDownItem, onMoveUpItem, readonly, registry, uiSchema, } = props; const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = registry.templates.ButtonTemplates; return ( <> {(hasMoveUp || hasMoveDown) && ( )} {(hasMoveUp || hasMoveDown) && ( )} {hasCopy && ( )} {hasRemove && ( )} ); }