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