import { useId, type ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Button, Form, Input, InputNumber, Select, Space, Switch } from 'antd'; import { MinusOutlined, PlusOutlined } from '@ant-design/icons'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { selectTagRender } from '@/components/form'; import { FormField } from '@/components/form/rhf'; interface StringListProps { name: string[]; label: ReactNode; tooltip?: string; placeholder: (index: number) => string; } function StringList({ name, label, tooltip, placeholder }: StringListProps) { const { t } = useTranslation(); const labelId = useId(); const { control } = useFormContext(); const { fields, append, remove } = useFieldArray({ control, name: name.join('.') }); return (