"use client" import { Plus } from 'lucide-react'; import React from 'react'; import { Button } from '@djangocfg/ui-core/components'; import { useAppT } from '@djangocfg/i18n'; import { ArrayFieldTemplateProps } from '@rjsf/utils'; /** * Array field template for JSON Schema Form * Renders array items with add/remove controls * * NOTE: In RJSF v6, `items` is an array of ReactElement (already rendered), * NOT an array of objects with {children, hasRemove, etc.}. * The actual rendering of each item (including remove buttons) is handled * by ArrayFieldItemTemplate. */ export function ArrayFieldTemplate(props: ArrayFieldTemplateProps) { const { title, items, canAdd, onAddClick, required, } = props; const t = useAppT(); return (