{/* Classic Add New ASN Card (restored) */}
{/* Дополнительные варианты */}
{ const [a, c] = String(line).split(/\s+/); return { asn: (a||'').trim(), community: (c||'').trim() }; }}
validateItem={(obj) => isValidAsn(obj.asn) && isValidCommunity(obj.community)}
onApply={(list) => {
setItems(prev => {
const merged = [...prev, ...list];
const map = new Map();
for (const it of merged) {
const key = String(it.asn).trim();
if (!map.has(key)) map.set(key, { asn: key, community: String(it.community).trim() });
}
return Array.from(map.values());
});
}}
/>
{ e.preventDefault(); }}
onDrop={onDropImport}
>
Перетащите файл TXT/CSV сюда для импорта (формат: ASN community)
{/* Drag & Drop импорт */}
{ e.preventDefault(); }}
onDrop={onDropImport}
>
Перетащите файл TXT/CSV сюда для импорта (формат: ASN community)
{/* Карточка действий больше не нужна — действия перенесены в page-header */}