import { useTranslation } from 'react-i18next'; import { Button, Card, Empty, Input, InputNumber, Select, Space } from 'antd'; import { ArrowDownOutlined, ArrowUpOutlined, DeleteOutlined, PlusOutlined } from '@ant-design/icons'; import { InputAddon } from '@/components/ui'; import type { FallbackRow } from '@/schemas/forms/inbound-form'; interface FallbacksCardProps { fallbacks: FallbackRow[]; fallbackChildOptions: { label: string; value: number }[]; addFallback: () => void; updateFallback: (rowKey: string, patch: Partial) => void; removeFallback: (idx: number) => void; moveFallback: (idx: number, direction: -1 | 1) => void; addAllFallbacks: () => void; } export default function FallbacksCard({ fallbacks, fallbackChildOptions, addFallback, updateFallback, removeFallback, moveFallback, addAllFallbacks, }: FallbacksCardProps) { const { t } = useTranslation(); return ( {fallbacks.length === 0 && ( )} {fallbacks.map((record, idx) => (
updateFallback(record.rowKey, { name: e.target.value })} /> ALPN updateFallback(record.rowKey, { alpn: e.target.value })} /> Path updateFallback(record.rowKey, { path: e.target.value })} /> Dest updateFallback(record.rowKey, { dest: e.target.value })} /> xver updateFallback(record.rowKey, { xver: Number(v) || 0 })} />
))}
); }